chore: update code format. (#628)
This commit is contained in:
@@ -89,7 +89,7 @@ func (g *DefaultGenerator) GenCall(ctx DirContext, proto parser.Proto, cfg *conf
|
||||
return err
|
||||
}
|
||||
|
||||
var alias = collection.NewSet()
|
||||
alias := collection.NewSet()
|
||||
for _, item := range proto.Message {
|
||||
alias.AddStr(fmt.Sprintf("%s = %s", parser.CamelCase(item.Name), fmt.Sprintf("%s.%s", proto.PbPackage, parser.CamelCase(item.Name))))
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ func (g *DefaultGenerator) GenLogic(ctx DirContext, proto parser.Proto, cfg *con
|
||||
}
|
||||
|
||||
func (g *DefaultGenerator) genLogicFunction(goPackage string, rpc *parser.RPC) (string, error) {
|
||||
var functions = make([]string, 0)
|
||||
functions := make([]string, 0)
|
||||
text, err := util.LoadTemplate(category, logicFuncTemplateFileFile, logicFunctionTemplate)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
@@ -164,6 +164,7 @@ func CamelCase(s string) string {
|
||||
}
|
||||
return string(t)
|
||||
}
|
||||
|
||||
func isASCIILower(c byte) bool {
|
||||
return 'a' <= c && c <= 'z'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user