diff --git a/tools/gendocs/main.go b/tools/gendocs/main.go index b837dfe..30d74aa 100644 --- a/tools/gendocs/main.go +++ b/tools/gendocs/main.go @@ -11,6 +11,7 @@ import ( "time" "github.com/fosrl/cli/cmd" + "github.com/spf13/cobra" "github.com/spf13/cobra/doc" ) @@ -23,6 +24,13 @@ url: %s ` +func disableCobraAutogenFooter(cmd *cobra.Command) { + cmd.DisableAutoGenTag = true + for _, c := range cmd.Commands() { + disableCobraAutogenFooter(c) + } +} + func main() { var ( outputDir = flag.String("dir", "./docs", "Output directory for generated documentation") @@ -38,6 +46,7 @@ func main() { // Get the root command rootCmd, _ := cmd.RootCommand(false) + disableCobraAutogenFooter(rootCmd) var err error if *withFrontMatter {