mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-13 18:00:00 +08:00
chore: update go-zero version (#5093)
Signed-off-by: kevin <wanjunfeng@gmail.com>
This commit is contained in:
@@ -53,9 +53,9 @@ func (g *Generator) genLogicInCompatibility(ctx DirContext, proto parser.Proto,
|
||||
return err
|
||||
}
|
||||
|
||||
imports := collection.NewSet()
|
||||
imports.AddStr(fmt.Sprintf(`"%v"`, ctx.GetSvc().Package))
|
||||
imports.AddStr(fmt.Sprintf(`"%v"`, ctx.GetPb().Package))
|
||||
imports := collection.NewSet[string]()
|
||||
imports.Add(fmt.Sprintf(`"%v"`, ctx.GetSvc().Package))
|
||||
imports.Add(fmt.Sprintf(`"%v"`, ctx.GetPb().Package))
|
||||
text, err := pathx.LoadTemplate(category, logicTemplateFileFile, logicTemplate)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -64,7 +64,7 @@ func (g *Generator) genLogicInCompatibility(ctx DirContext, proto parser.Proto,
|
||||
"logicName": fmt.Sprintf("%sLogic", stringx.From(rpc.Name).ToCamel()),
|
||||
"functions": functions,
|
||||
"packageName": "logic",
|
||||
"imports": strings.Join(imports.KeysStr(), pathx.NL),
|
||||
"imports": strings.Join(imports.Keys(), pathx.NL),
|
||||
}, filename, false)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -106,9 +106,9 @@ func (g *Generator) genLogicGroup(ctx DirContext, proto parser.Proto, cfg *conf.
|
||||
return err
|
||||
}
|
||||
|
||||
imports := collection.NewSet()
|
||||
imports.AddStr(fmt.Sprintf(`"%v"`, ctx.GetSvc().Package))
|
||||
imports.AddStr(fmt.Sprintf(`"%v"`, ctx.GetPb().Package))
|
||||
imports := collection.NewSet[string]()
|
||||
imports.Add(fmt.Sprintf(`"%v"`, ctx.GetSvc().Package))
|
||||
imports.Add(fmt.Sprintf(`"%v"`, ctx.GetPb().Package))
|
||||
text, err := pathx.LoadTemplate(category, logicTemplateFileFile, logicTemplate)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -118,7 +118,7 @@ func (g *Generator) genLogicGroup(ctx DirContext, proto parser.Proto, cfg *conf.
|
||||
"logicName": logicName,
|
||||
"functions": functions,
|
||||
"packageName": packageName,
|
||||
"imports": strings.Join(imports.KeysStr(), pathx.NL),
|
||||
"imports": strings.Join(imports.Keys(), pathx.NL),
|
||||
}, filename, false); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user