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)