package test import ( //"Yunlot/Handle/TcpServer" "net" "time" ) import ( "testing" ) func TestTCP(t *testing.T) { //go TcpServer.TcpServer() // ln, err := net.Listen("tcp", ":111") if err != nil { // handle error } for { _, err := ln.Accept() if err != nil { // handle error } //go handleConnection(conn) } time.Sleep(time.Second * 1000) }