Can cobra generate a single manpage with all your commands? And what would be the best way to do it if not?
Do you mean this? https://github.com/spf13/cobra/blob/master/doc/man_docs.md
That code snippet generates a man file for each of the commands in my application. Like in most other applications I want the command, to generate just one file for the entire set of commands, like in git and such.
The command I use when I follow the code snippet from @1138-4EB is the applications rootCmd.
@groenborg Hmmm, for me git has a separate man page for every command. Is it not that way for you?
@justinclift my bad, it missed an essential part of using man pages.. You have to use a dash between the git subcommands to get their man pages, I did not realize that
thanks for the answers
Most helpful comment
That code snippet generates a man file for each of the commands in my application. Like in most other applications I want the command, to generate just one file for the entire set of commands, like in git and such.
The command I use when I follow the code snippet from @1138-4EB is the applications rootCmd.