I’m new to go and cobra, and I’ve been following tutorials/reading on how to structure the files/folders for commands, but I’ve come unstuck when I’ve added a subcommand to my commands, and hoping for a few pointers
I have this layout
--cmd
|-cli
|--foo
|--foo.go
|--bar
|--bar.go
This works perfectly fine (also works with go build)
go run .main.go foo bar
For reference foo.go imports bar.go and I added it as a command to foo but bar doesn’t show in help: i.e: go run .main.go foo --help
or: go run .main.go --help
I’ve looked at other posts on this on stack overflow, but not seen any clarity for structure or help not showing for sub subcommands