mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-23 17:20:24 +08:00
simplify code generation
This commit is contained in:
parent
84cc41df42
commit
936dd67008
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user