From f32c6a9b28c01bc94b7916decb6194584d7ac395 Mon Sep 17 00:00:00 2001 From: kingxt Date: Mon, 9 Nov 2020 10:06:45 +0800 Subject: [PATCH] rewrite (#194) Co-authored-by: kim --- tools/goctl/api/new/newservice.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/goctl/api/new/newservice.go b/tools/goctl/api/new/newservice.go index 99f562ba..e448db3b 100644 --- a/tools/goctl/api/new/newservice.go +++ b/tools/goctl/api/new/newservice.go @@ -27,9 +27,9 @@ service {{.name}}-api { func NewService(c *cli.Context) error { args := c.Args() - dirName := "greet" - if len(args) > 0 { - dirName = args.First() + dirName := args.First() + if len(dirName) == 0 { + dirName = "greet" } abs, err := filepath.Abs(dirName)