22 lines
473 B
Smarty
22 lines
473 B
Smarty
package main
|
|
|
|
import (
|
|
"{{.ProjectName}}/gen/go/service"
|
|
{{range .StructServiceNames}}
|
|
"{{$.ProjectName}}/server/logics/{{.LogicPackageName}}"
|
|
{{- end}}
|
|
|
|
"time"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
func init() {
|
|
time.Local = time.UTC
|
|
}
|
|
|
|
func MainRegisterServer(s *grpc.Server) {
|
|
{{range .StructServiceNames}}
|
|
service.Register{{.StructServiceName}}Server(s, &{{.LogicPackageName}}.{{.StructServiceName}}LogicGrpc{}) // {{.LogicPackageName}} 服务注册
|
|
{{- end}}
|
|
}
|