From d3dccd1ef4983659e4bf01202d0def0c9802f6fb Mon Sep 17 00:00:00 2001 From: qiantao Date: Tue, 26 May 2020 18:03:53 +0800 Subject: [PATCH] fix bug --- cmd/commands/hprose/hprose.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cmd/commands/hprose/hprose.go b/cmd/commands/hprose/hprose.go index 3246bfb..05d9ad7 100644 --- a/cmd/commands/hprose/hprose.go +++ b/cmd/commands/hprose/hprose.go @@ -34,7 +34,7 @@ var CmdHproseapp = &commands.Command{ The command 'hprose' creates a folder named [appname] with the following structure: ├── main.go - ├── go.mod + ├── go.mod ├── {{"conf"|foldername}} │ └── app.conf └── {{"models"|foldername}} @@ -67,18 +67,13 @@ func init() { func createhprose(cmd *commands.Command, args []string) int { output := cmd.Out() - - if len(args) != 1 { + if len(args) == 0 { beeLogger.Log.Fatal("Argument [appname] is missing") } curpath, _ := os.Getwd() if len(args) > 1 { cmd.Flag.Parse(args[1:]) - } - - if len(args) >= 2 { - cmd.Flag.Parse(args[1:]) } else { module = "false" }