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) {
{{.pkg}}.Register{{.service}}Server(grpcServer, srv)
switch c.Mode {
case service.DevMode,service.TestMode:
if c.Mode == service.DevMode || c.Mode == service.TestMode {
reflection.Register(grpcServer)
default:
}
})
defer s.Stop()

Loading…
Cancel
Save