missing \n in Printf()

This commit is contained in:
Jeff Carr 2025-08-31 16:24:50 -05:00
parent 0172b902ed
commit 58e2a02c5b
1 changed files with 5 additions and 5 deletions

10
main.go
View File

@ -151,7 +151,7 @@ func doME(pm *Portmap, gus net.Listener) {
log.Info("RUNNING DIAL") log.Info("RUNNING DIAL")
dest, err := net.Dial("tcp", where) dest, err := net.Dial("tcp", where)
if err != nil { if err != nil {
log.Printf("Failed to connect to %s %v", where, err) log.Printf("Failed to connect to %s %v\n", where, err)
continue continue
} }
defer dest.Close() defer dest.Close()
@ -185,10 +185,10 @@ func gus3000(pm *Portmap) {
// Accept incoming connection // Accept incoming connection
clientConn, err := listener.Accept() clientConn, err := listener.Accept()
if err != nil { if err != nil {
log.Printf("Failed to accept client connection: %v", err) log.Printf("Failed to accept client connection: %v\n", err)
continue continue
} }
// log.Printf("Client connected: %s", clientConn.RemoteAddr()) // log.Printf("Client connected: %s\n", clientConn.RemoteAddr())
// Handle the connection in a separate goroutine // Handle the connection in a separate goroutine
go handleConnection(clientConn, connect, port) go handleConnection(clientConn, connect, port)
@ -202,7 +202,7 @@ func handleConnection(clientConn net.Conn, where string, localport int) {
// targetConn, err := net.Dial("tcp", "go.wit.com:80") // targetConn, err := net.Dial("tcp", "go.wit.com:80")
targetConn, err := net.Dial("tcp", where) targetConn, err := net.Dial("tcp", where)
if err != nil { if err != nil {
log.Printf("Failed to connect to %s %v", where, err) log.Printf("Failed to connect to %s %v\n", where, err)
return return
} }
defer targetConn.Close() defer targetConn.Close()
@ -341,7 +341,7 @@ func connectME() {
// Accept incoming connection // Accept incoming connection
src, err := listener.Accept() src, err := listener.Accept()
if err != nil { if err != nil {
log.Printf("Failed to accept client connection: %v", err) log.Printf("Failed to accept client connection: %v\n", err)
return return
} }
log.Printf("Client connected: %s\n", src.RemoteAddr()) log.Printf("Client connected: %s\n", src.RemoteAddr())