Hello minux,
I did panic with e.Error() in the code, but the paniking process was not running at all, it looks like the goroutine panic in the "net" library, which I cannot caught, like this:
goroutine 1991 [runnable]:
syscall.Syscall(0x75586bdd, 0x3, 0x9c28, 0x1261dc08, 0x10, ...)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist894290290/go/src/pkg/runtime/zsyscall_windows_386.c:74 +0x49
syscall.connect(0x9c28, 0x1261dc08, 0x10, 0x0, 0x0, ...)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist894290290/go/src/pkg/syscall/zsyscall_windows_386.go:1252 +0x5e
syscall.Connect(0x9c28, 0x116427e0, 0x1261dc00, 0x0, 0x0, ...)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist894290290/go/src/pkg/syscall/syscall_windows.go:576 +0x74
net.(*netFD).connect(0x12bb2e00, 0x116427e0, 0x1261dc00, 0x463b70, 0x3, ...)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist894290290/go/src/pkg/net/fd_windows.go:273 +0x38
net.socket(0x463b70, 0x3, 0x2, 0x1, 0x0, ...)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist894290290/go/src/pkg/net/sock.go:56 +0x2ed
net.internetSocket(0x463b70, 0x3, 0x0, 0x0, 0x116216f0, ...)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist894290290/go/src/pkg/net/ipsock_posix.go:138 +0x25a
net.DialTCP(0x463b70, 0x3, 0x0, 0x12623210, 0x12623201, ...)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist894290290/go/src/pkg/net/tcpsock_posix.go:243 +0x13d
net.dialAddr(0x463b70, 0x3, 0x469010, 0x10, 0x11636380, ...)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist894290290/go/src/pkg/net/dial.go:102 +0x14c
net.Dial(0x463b70, 0x3, 0x469010, 0x10, 0x0, ...)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist894290290/go/src/pkg/net/dial.go:96 +0x9e
main.serve()
D:/code/src/demo/main.go:22 +0x3a
created by main.main
D:/code/src/demo/main.go:11 +0x3a