import error message

This commit is contained in:
2020-02-23 23:59:37 +08:00
parent e98f06290f
commit a4b52c59cc

View File

@@ -47,7 +47,7 @@ func main() {
return
}
if len(tcpListenConfig.TcpListens) == 0 {
fmt.Println("[ERROR] Not find any mapping in config")
fmt.Printf("[ERROR] Not find any mapping in config\n")
printHelpMessage()
return
}
@@ -62,7 +62,7 @@ func main() {
func serverTcpListen(tcpListen TcpListen) {
lis, err := net.Listen("tcp", tcpListen.Listen)
if err != nil {
fmt.Println(err)
fmt.Printf("[ERROR] Listen on port %s error: %s\n", tcpListen.Listen, err)
return
}
defer lis.Close()