From 00c5734021c8333a4c00e0438932d3f919717064 Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Thu, 12 Aug 2021 14:58:37 +0800 Subject: [PATCH] format coding style (#905) --- tools/goctl/api/gogen/genmain.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/goctl/api/gogen/genmain.go b/tools/goctl/api/gogen/genmain.go index 304c4bf5..9f0df228 100644 --- a/tools/goctl/api/gogen/genmain.go +++ b/tools/goctl/api/gogen/genmain.go @@ -45,6 +45,7 @@ func genMain(dir, rootPkg string, cfg *config.Config, api *spec.ApiSpec) error { if err != nil { return err } + configName := filename if strings.HasSuffix(filename, "-api") { filename = strings.ReplaceAll(filename, "-api", "") @@ -60,7 +61,7 @@ func genMain(dir, rootPkg string, cfg *config.Config, api *spec.ApiSpec) error { builtinTemplate: mainTemplate, data: map[string]string{ "importPackages": genMainImports(rootPkg), - "serviceName": configName, + "serviceName": configName, }, }) }