From 2c09ecb4864e93914d0e86d66a0aec33bef91523 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 12 Jul 2020 08:20:14 -0700 Subject: [PATCH] Disable date stamp in command line reference documentation By default, Cobra automatically adds a date stamp to the generated command line reference content. Having a date stamp is not necessarily a bad thing, though it's also doubtful that it is useful enough to justify its presence. However, the formatting of this date stamp causes it to be shown as an item in the table of contents of each command reference page, inappropriately located under the "SEE ALSO" heading. This clutters up the documentation without providing any benefits at all. Fortunately, Cobra has provided an option to disable this behavior: https://github.com/spf13/cobra/blob/master/doc/README.md#disableautogentag --- docsgen/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/docsgen/main.go b/docsgen/main.go index 9e8cf837a61..128d1802f67 100644 --- a/docsgen/main.go +++ b/docsgen/main.go @@ -29,6 +29,7 @@ func main() { } cli := cli.NewCommand() + cli.DisableAutoGenTag = true // Disable addition of auto-generated date stamp err := doc.GenMarkdownTree(cli, os.Args[1]) if err != nil { log.Fatal(err)