spf13--cobra/cobra/cmd
Carlos Marx b45934648f Fix command name collision on generator
When creating new commands via `cobra add`, it is not possible to add
commands with the same name to different parents. They will just
overwrite each other.

With this patch, the command's object identifier is templated
`parentCommandCmd`, the `Use` field `command` and the file name
`parent_command.go`.

Fixes #1059
Fixes #1131

Signed-off-by: Carlos Marx <me@carlosmarx.com>
2021-07-08 12:00:13 -03:00
..
testdata drop mitchellh/go-homedir (#853) 2021-06-30 14:08:43 -04:00
add.go Fix command name collision on generator 2021-07-08 12:00:13 -03:00
add_test.go Fix command name collision on generator 2021-07-08 12:00:13 -03:00
golden_test.go Use golangci-lint (#1044) 2021-02-07 17:08:50 -07:00
helpers.go Use golangci-lint (#1044) 2021-02-07 17:08:50 -07:00
helpers_test.go Use golangci-lint (#1044) 2021-02-07 17:08:50 -07:00
init.go Use golangci-lint (#1044) 2021-02-07 17:08:50 -07:00
init_test.go Correcting misspelled words (#1349) 2021-05-10 17:19:33 -06:00
license_agpl.go cmd: Refine formatting of included licenses 2017-07-30 02:35:06 -06:00
license_apache_2.go cmd: Refine formatting of included licenses 2017-07-30 02:35:06 -06:00
license_bsd_clause_2.go cmd: Refine formatting of included licenses 2017-07-30 02:35:06 -06:00
license_bsd_clause_3.go cmd: Refine formatting of included licenses 2017-07-30 02:35:06 -06:00
license_gpl_2.go cmd: Refine formatting of included licenses 2017-07-30 02:35:06 -06:00
license_gpl_3.go cmd: Refine formatting of included licenses 2017-07-30 02:35:06 -06:00
license_lgpl.go cmd: Refine formatting of included licenses 2017-07-30 02:35:06 -06:00
license_mit.go cmd: Refine formatting of included licenses 2017-07-30 02:35:06 -06:00
licenses.go Use golangci-lint (#1044) 2021-02-07 17:08:50 -07:00
project.go Fix command name collision on generator 2021-07-08 12:00:13 -03:00
project_test.go vgo - strip out unused methods 2019-06-07 10:31:03 -04:00
root.go drop mitchellh/go-homedir (#853) 2021-06-30 14:08:43 -04:00