chore: change interface{} to any (#2818)

* chore: change interface{} to any

* chore: update goctl version to 1.5.0

* chore: update goctl deps
This commit is contained in:
Kevin Wan
2023-01-24 16:32:02 +08:00
committed by GitHub
parent 7e0ac77139
commit ae87114282
221 changed files with 1910 additions and 2207 deletions

View File

@@ -60,7 +60,7 @@ func (g *Generator) genLogicInCompatibility(ctx DirContext, proto parser.Proto,
if err != nil {
return err
}
err = util.With("logic").GoFmt(true).Parse(text).SaveTo(map[string]interface{}{
err = util.With("logic").GoFmt(true).Parse(text).SaveTo(map[string]any{
"logicName": fmt.Sprintf("%sLogic", stringx.From(rpc.Name).ToCamel()),
"functions": functions,
"packageName": "logic",
@@ -114,7 +114,7 @@ func (g *Generator) genLogicGroup(ctx DirContext, proto parser.Proto, cfg *conf.
return err
}
if err = util.With("logic").GoFmt(true).Parse(text).SaveTo(map[string]interface{}{
if err = util.With("logic").GoFmt(true).Parse(text).SaveTo(map[string]any{
"logicName": logicName,
"functions": functions,
"packageName": packageName,
@@ -139,7 +139,7 @@ func (g *Generator) genLogicFunction(serviceName, goPackage, logicName string,
comment := parser.GetComment(rpc.Doc())
streamServer := fmt.Sprintf("%s.%s_%s%s", goPackage, parser.CamelCase(serviceName),
parser.CamelCase(rpc.Name), "Server")
buffer, err := util.With("fun").Parse(text).Execute(map[string]interface{}{
buffer, err := util.With("fun").Parse(text).Execute(map[string]any{
"logicName": logicName,
"method": parser.CamelCase(rpc.Name),
"hasReq": !rpc.StreamsRequest,