From 71c9c02eeb0b5dbf524cb1290f916446e5c61e69 Mon Sep 17 00:00:00 2001 From: Alexandr Dubovikov Date: Tue, 29 Aug 2023 11:09:25 +0200 Subject: [PATCH] removed depricated ioutils --- HFP.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/HFP.go b/HFP.go index cf8a2cb..610e052 100644 --- a/HFP.go +++ b/HFP.go @@ -1,10 +1,8 @@ package main import ( - //"bufio" "flag" "fmt" - "io/ioutil" "log" "net" "os" @@ -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") @@ -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 { @@ -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) }