Skip to content

Commit

Permalink
removed depricated ioutils
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovikov committed Aug 29, 2023
1 parent 7513b22 commit 71c9c02
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions HFP.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package main

import (
//"bufio"
"flag"
"fmt"
"io/ioutil"
"log"
"net"
"os"
Expand All @@ -15,8 +13,7 @@ import (
"github.com/guumaster/logsymbols"
)

const AppVersion = "1.0"

const AppVersion = "0.55.3"

var localAddr *string = flag.String("l", ":9060", "Local HEP listening address")
var remoteAddr *string = flag.String("r", "192.168.2.2:9060", "Remote HEP address")
Expand Down Expand Up @@ -60,7 +57,6 @@ func initLoopbackConn(wg *sync.WaitGroup) {

func connectToHEPBackend(dst string) net.Conn {


for {
conn, err := net.Dial("tcp", dst)
if err != nil {
Expand Down Expand Up @@ -347,7 +343,7 @@ func copyHEPbufftoFile(inbytes []byte, file string) (int64, error) {

func copyHEPFileOut(outnet net.Conn) (int, error) {

HEPFileData, HEPFileDataerr := ioutil.ReadFile(HEPsavefile)
HEPFileData, HEPFileDataerr := os.ReadFile(HEPsavefile)
if HEPFileDataerr != nil {
fmt.Println("Read HEP file error", HEPFileDataerr)
}
Expand Down

0 comments on commit 71c9c02

Please sign in to comment.