This commit is contained in:
kesonan
2024-04-01 23:22:29 +08:00
committed by GitHub
parent 8c0bb27136
commit 2d3ebb9b62
3 changed files with 12 additions and 9 deletions

View File

@@ -92,7 +92,7 @@ func (g *Generator) genServerGroup(ctx DirContext, proto parser.Proto, cfg *conf
if err = util.With("server").GoFmt(true).Parse(text).SaveTo(map[string]any{
"head": head,
"unimplementedServer": fmt.Sprintf("%s.Unimplemented%sServer", proto.PbPackage,
stringx.From(service.Name).ToCamel()),
parser.CamelCase(service.Name)),
"server": stringx.From(service.Name).ToCamel(),
"imports": strings.Join(imports.KeysStr(), pathx.NL),
"funcs": strings.Join(funcList, pathx.NL),
@@ -143,7 +143,7 @@ func (g *Generator) genServerInCompatibility(ctx DirContext, proto parser.Proto,
return util.With("server").GoFmt(true).Parse(text).SaveTo(map[string]any{
"head": head,
"unimplementedServer": fmt.Sprintf("%s.Unimplemented%sServer", proto.PbPackage,
stringx.From(service.Name).ToCamel()),
parser.CamelCase(service.Name)),
"server": stringx.From(service.Name).ToCamel(),
"imports": strings.Join(imports.KeysStr(), pathx.NL),
"funcs": strings.Join(funcList, pathx.NL),