From 519db812b48f3be74e24ea5a17f579e85b227c7f Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Fri, 27 Aug 2021 23:09:47 +0800 Subject: [PATCH] format coding style (#969) --- tools/goctl/rpc/generator/gen.go | 2 +- tools/goctl/rpc/generator/mkdir.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/goctl/rpc/generator/gen.go b/tools/goctl/rpc/generator/gen.go index e5d56e98..02b32b74 100644 --- a/tools/goctl/rpc/generator/gen.go +++ b/tools/goctl/rpc/generator/gen.go @@ -63,7 +63,7 @@ func (g *RPCGenerator) Generate(src, target string, protoImportPath []string, go return err } - dirCtx, err := mkdir(projectCtx, proto,g.cfg) + dirCtx, err := mkdir(projectCtx, proto, g.cfg) if err != nil { return err } diff --git a/tools/goctl/rpc/generator/mkdir.go b/tools/goctl/rpc/generator/mkdir.go index 09ae622a..9525563d 100644 --- a/tools/goctl/rpc/generator/mkdir.go +++ b/tools/goctl/rpc/generator/mkdir.go @@ -1,14 +1,14 @@ package generator import ( - conf "github.com/tal-tech/go-zero/tools/goctl/config" - "github.com/tal-tech/go-zero/tools/goctl/util/format" "path/filepath" "strings" + conf "github.com/tal-tech/go-zero/tools/goctl/config" "github.com/tal-tech/go-zero/tools/goctl/rpc/parser" "github.com/tal-tech/go-zero/tools/goctl/util" "github.com/tal-tech/go-zero/tools/goctl/util/ctx" + "github.com/tal-tech/go-zero/tools/goctl/util/format" "github.com/tal-tech/go-zero/tools/goctl/util/stringx" ) @@ -61,7 +61,7 @@ func mkdir(ctx *ctx.ProjectContext, proto parser.Proto, cfg *conf.Config) (DirCo serverDir := filepath.Join(internalDir, "server") svcDir := filepath.Join(internalDir, "svc") pbDir := filepath.Join(ctx.WorkDir, proto.GoPackage) - sName,err:=format.FileNamingFormat(cfg.NamingFormat,proto.Service.Name) + sName, err := format.FileNamingFormat(cfg.NamingFormat, proto.Service.Name) if err != nil { return nil, err }