reorder some operations
This commit is contained in:
parent
732e4db0d4
commit
b8ad19ad0d
@ -43,17 +43,12 @@ Example: cobra add server -> resulting in a new cmd/server.go`,
|
|||||||
er("add needs a name for the command")
|
er("add needs a name for the command")
|
||||||
}
|
}
|
||||||
|
|
||||||
commandName := validateCmdName(args[0])
|
|
||||||
|
|
||||||
if packageName == "" {
|
|
||||||
// derive packageName
|
|
||||||
}
|
|
||||||
|
|
||||||
wd, err := os.Getwd()
|
wd, err := os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
er(err)
|
er(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
commandName := validateCmdName(args[0])
|
||||||
command := &Command{
|
command := &Command{
|
||||||
CmdName: commandName,
|
CmdName: commandName,
|
||||||
CmdParent: parentName,
|
CmdParent: parentName,
|
||||||
|
Loading…
Reference in New Issue
Block a user