package main import ( "context" "flag" "github.com/smallnest/rpcx/server" ) var ( addr = flag.String("addr", "127.0.0.1:8972", "server address") ) func main() { flag.Parse() s := server.NewServer() s.Register(new(Bids), "") err := s.Serve("tcp", *addr) if err != nil { panic(err) } } type Bids struct {} type Args struct { A int } func (b *Bids)GetChanList(ctx context.Context,args *int ,reply *string)error { *reply = "你好" return nil } //func (b *Bids)GetCateList(ctx context.Context,args *Args ,reply *[]semCategory)error { // *reply = []semCategory{} // return nil //}