chore: refine code (#1215)

master
Kevin Wan 3 years ago committed by GitHub
parent a72b0a689b
commit f8367856e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -40,12 +40,9 @@ func main() {
s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) { s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
{{.pkg}}.Register{{.service}}Server(grpcServer, srv) {{.pkg}}.Register{{.service}}Server(grpcServer, srv)
switch c.Mode { if c.Mode == service.DevMode || c.Mode == service.TestMode {
case service.DevMode,service.TestMode:
reflection.Register(grpcServer) reflection.Register(grpcServer)
default:
} }
}) })
defer s.Stop() defer s.Stop()

Loading…
Cancel
Save