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
|
|
|
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
)
|
|
|
|
|
|
|
|
func MainRegisterServer(s *grpc.Server) {
|
|
|
|
{{range .StructServiceNames}}
|
|
|
|
service.Register{{.StructServiceName}}Server(s, &{{.LogicPackageName}}.{{.StructServiceName}}LogicGrpc{}) // {{.LogicPackageName}} 服务注册
|
|
|
|
{{- end}}
|
|
|
|
}
|