From b8ad19ad0d8befeb56daba8874bc17552c4eb405 Mon Sep 17 00:00:00 2001 From: jharshman Date: Wed, 30 Jan 2019 01:34:31 -0800 Subject: [PATCH] reorder some operations --- cobra/cmd/add.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cobra/cmd/add.go b/cobra/cmd/add.go index 806a7cc..599fc60 100644 --- a/cobra/cmd/add.go +++ b/cobra/cmd/add.go @@ -43,17 +43,12 @@ Example: cobra add server -> resulting in a new cmd/server.go`, er("add needs a name for the command") } - commandName := validateCmdName(args[0]) - - if packageName == "" { - // derive packageName - } - wd, err := os.Getwd() if err != nil { er(err) } + commandName := validateCmdName(args[0]) command := &Command{ CmdName: commandName, CmdParent: parentName,