spf13--cobra/cobra/tpl
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
..
main.go Fix command name collision on generator 2021-07-08 12:00:13 -03:00