* refactor(tools ): refactor cod

Improve code readability and performance

* fix(tools ): fix len bug

Co-authored-by: ksco <hyang@33.cn>
This commit is contained in:
_ksco
2021-08-11 17:33:18 +08:00
committed by GitHub
parent e024aebb66
commit cc264dcf55
4 changed files with 13 additions and 19 deletions

View File

@@ -60,7 +60,7 @@ func mkdir(ctx *ctx.ProjectContext, proto parser.Proto) (DirContext, error) {
svcDir := filepath.Join(internalDir, "svc")
pbDir := filepath.Join(ctx.WorkDir, proto.GoPackage)
callDir := filepath.Join(ctx.WorkDir, strings.ToLower(stringx.From(proto.Service.Name).ToCamel()))
if strings.ToLower(proto.Service.Name) == strings.ToLower(proto.GoPackage) {
if strings.EqualFold(proto.Service.Name, proto.GoPackage) {
callDir = filepath.Join(ctx.WorkDir, strings.ToLower(stringx.From(proto.Service.Name+"_client").ToCamel()))
}