proto/goutils/proto_build/tpls/main_gen.tpl

22 lines
473 B
Smarty
Raw Normal View History

2023-12-04 09:15:41 +00:00
package main
import (
"{{.ProjectName}}/gen/go/service"
2023-12-05 02:41:26 +00:00
{{range .StructServiceNames}}
"{{$.ProjectName}}/server/logics/{{.LogicPackageName}}"
{{- end}}
2023-12-04 09:15:41 +00:00
2024-01-17 09:26:13 +00:00
"time"
2023-12-04 09:15:41 +00:00
"google.golang.org/grpc"
)
2024-01-17 09:26:13 +00:00
func init() {
time.Local = time.UTC
}
2023-12-04 09:15:41 +00:00
func MainRegisterServer(s *grpc.Server) {
{{range .StructServiceNames}}
service.Register{{.StructServiceName}}Server(s, &{{.LogicPackageName}}.{{.StructServiceName}}LogicGrpc{}) // {{.LogicPackageName}} 服务注册
{{- end}}
}