```
package main
import (
"fmt"
"net"
)
func graf(port int16) {
addres := ":" + string(port)
l, err := net.Listen("tcp", addres)
if err != nil {
panic(err)
}
for {
conn, err := l.Accept()
if err != nil {
panic(err)
}
go handleConnection(conn)
}
}
func handleConnection(conn net.Conn) {
fmt.Println(conn.RemoteAddr())
}
func main() {
graf(int16(2433))
}
```
运行报错啥情况
```
panic: listen tcp: lookup tcp/ঁ: nodename nor servname provided, or not known
goroutine 1 [running]:
main.graf(0xc000080981)
/Users/jiangyd/mygo/src/lk.go:14 +0x176
main.main()
/Users/jiangyd/mygo/src/lk.go:31 +0x28
exit status 2
```
有疑问加站长微信联系(非本文作者)