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
umarcor
8eaca5f0f4
drop mitchellh/go-homedir ( #853 )
2021-06-30 14:08:43 -04:00
Rob Playford
9a432671fd
fix home directory config not loading ( #1282 )
...
leverage `viper.SetConfigType("yaml")` to fix issue regarding home directory configuration failing to load.
2021-06-15 19:52:13 -06:00
Unai Martinez-Corral
652c755d37
Use golangci-lint ( #1044 )
...
Use golangci-lint. Repair warnings and errors resulting from linting.
2021-02-07 17:08:50 -07:00
Joshua Harshman
447f182a9d
format tpl/main.go templates ( #980 )
2019-12-23 13:51:40 -07:00
Bruce Downs
993cc5372a
Adjustments per PR review feedback from @bogem
2019-08-02 01:25:21 +05:00
Bruce Downs
51f06c7dd1
Correct all complaints from golint
...
* i.e.
* go get golang.org/x/lint/golint
* go list ./... | xargs golint
2019-08-02 01:25:21 +05:00
jharshman
11aa612384
test add
2019-06-07 10:31:03 -04:00
jharshman
2fea75b02e
vgo - add command working
2019-06-07 10:31:03 -04:00
jharshman
c7ac101cf8
vgo - fixing up the add op to work with vgo
2019-06-07 10:31:03 -04:00
jharshman
3741457400
add CommandTemplate
2019-06-07 10:31:03 -04:00
jharshman
50665e9993
vgo - update golden templates
2019-06-07 10:31:03 -04:00
jharshman
17dc9f8142
fixing up templates more
2019-06-07 10:31:03 -04:00
jharshman
26d210e2cd
vgo - fixing up the root template
2019-06-07 10:31:03 -04:00
jharshman
80ea2901b6
vgo-support - re-working code generator
2019-06-07 10:31:03 -04:00