chore: update go-zero version (#5093)

Signed-off-by: kevin <wanjunfeng@gmail.com>
This commit is contained in:
Kevin Wan
2025-08-17 17:00:15 +08:00
committed by GitHub
parent a5d42e20d5
commit a81d898408
16 changed files with 99 additions and 107 deletions

View File

@@ -64,7 +64,7 @@ func (g *Generator) genCallGroup(ctx DirContext, proto parser.Proto, cfg *conf.C
isCallPkgSameToGrpcPkg := childDir == ctx.GetProtoGo().Filename
serviceName := stringx.From(service.Name).ToCamel()
alias := collection.NewSet()
alias := collection.NewSet[string]()
var hasSameNameBetweenMessageAndService bool
for _, item := range proto.Message {
msgName := getMessageName(*item.Message)
@@ -72,7 +72,7 @@ func (g *Generator) genCallGroup(ctx DirContext, proto parser.Proto, cfg *conf.C
hasSameNameBetweenMessageAndService = true
}
if !isCallPkgSameToPbPkg {
alias.AddStr(fmt.Sprintf("%s = %s", parser.CamelCase(msgName),
alias.Add(fmt.Sprintf("%s = %s", parser.CamelCase(msgName),
fmt.Sprintf("%s.%s", proto.PbPackage, parser.CamelCase(msgName))))
}
}
@@ -102,7 +102,7 @@ func (g *Generator) genCallGroup(ctx DirContext, proto parser.Proto, cfg *conf.C
protoGoPackage = ""
}
aliasKeys := alias.KeysStr()
aliasKeys := alias.Keys()
sort.Strings(aliasKeys)
if err = util.With("shared").GoFmt(true).Parse(text).SaveTo(map[string]any{
"name": callFilename,
@@ -135,7 +135,7 @@ func (g *Generator) genCallInCompatibility(ctx DirContext, proto parser.Proto,
}
serviceName := stringx.From(service.Name).ToCamel()
alias := collection.NewSet()
alias := collection.NewSet[string]()
var hasSameNameBetweenMessageAndService bool
for _, item := range proto.Message {
msgName := getMessageName(*item.Message)
@@ -143,7 +143,7 @@ func (g *Generator) genCallInCompatibility(ctx DirContext, proto parser.Proto,
hasSameNameBetweenMessageAndService = true
}
if !isCallPkgSameToPbPkg {
alias.AddStr(fmt.Sprintf("%s = %s", parser.CamelCase(msgName),
alias.Add(fmt.Sprintf("%s = %s", parser.CamelCase(msgName),
fmt.Sprintf("%s.%s", proto.PbPackage, parser.CamelCase(msgName))))
}
}
@@ -174,7 +174,7 @@ func (g *Generator) genCallInCompatibility(ctx DirContext, proto parser.Proto,
pbPackage = ""
protoGoPackage = ""
}
aliasKeys := alias.KeysStr()
aliasKeys := alias.Keys()
sort.Strings(aliasKeys)
return util.With("shared").GoFmt(true).Parse(text).SaveTo(map[string]any{
"name": callFilename,