Browse Source

simplify code generation

kevin 4 years ago
parent
commit
936dd67008
1 changed files with 1 additions and 2 deletions
  1. 1 2
      tools/goctl/rpc/gen/genmain.go

+ 1 - 2
tools/goctl/rpc/gen/genmain.go

@@ -35,10 +35,9 @@ func main() {
 	ctx := svc.NewServiceContext(c)
 	{{.srv}}
 
-	s, err := zrpc.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
+	s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
 		{{.registers}}
 	})
-	logx.Must(err)
 	defer s.Stop()
 
 	fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)