请问我按照readme里面运行服务报错
[root@server ]$ go run main.go server.go go: finding github.com/aceld/zinx/ziface latest go: finding github.com/aceld/zinx latest go: finding github.com/aceld/zinx/znet latest go: downloading github.com/aceld/zinx v0.0.0-20191210110905-0a663b2d6b15 go: extracting github.com/aceld/zinx v0.0.0-20191210110905-0a663b2d6b15 build command-line-arguments: cannot load zinx/utils: cannot find module providing package zinx/utils
package main
import ( "github.com/aceld/zinx/znet" )
func main() { //1 创建一个server句柄 s := znet.NewServer()
//2 配置路由
s.AddRouter(0, &PingRouter{})
//3 开启服务
s.Serve()
}
package main
import ( "fmt"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/znet"
)
type PingRouter struct { znet.BaseRouter }
func (this *PingRouter) Handle(request ziface.IRequest) { fmt.Println("recv from client : msgId=", request.GetMsgID(), ", data=", string(request.GetData()))
err := request.GetConnection().SendBuffMsg(0, []byte("ping...ping...ping"))
if err != nil {
fmt.Println(err)
}
}
go run server.go