1
0
Fork 0
mirror of https://github.com/spf13/cobra synced 2025-02-21 18:26:36 +00:00
spf13--cobra/doc
Marc Lopez Rubio 02a0d2fbc9
doc: GenMarkdown skip Synopsis on empty long cmd ()
This patch modifies the GenMarkdownCustom to skip writing a Synopsis
header with the `cmd.Short` duplicated both before and after the header.

Instead, it only writes the `### Synopsis` header and the paragraph when
a `cmd.Long` has some kind of content in it.

Adds `TestGenMdDocWithNoLongOrSynopsis` as the test case.

Signed-off-by: Marc Lopez <marc5.12@outlook.com>
2020-08-26 09:18:51 -06:00
..
cmd_test.go doc: GenMarkdown skip Synopsis on empty long cmd () 2020-08-26 09:18:51 -06:00
man_docs.go Man pages won't have auto gen tag when option is disabled () 2020-04-29 11:15:55 -06:00
man_docs.md Fix () 2017-04-19 14:39:58 +02:00
man_docs_test.go Man pages won't have auto gen tag when option is disabled () 2020-04-29 11:15:55 -06:00
man_examples_test.go doc: Fix govet complaints () 2017-04-01 15:45:39 -05:00
md_docs.go doc: GenMarkdown skip Synopsis on empty long cmd () 2020-08-26 09:18:51 -06:00
md_docs.md substitute wrong word in md_docs () 2019-12-02 08:04:30 -05:00
md_docs_test.go doc: GenMarkdown skip Synopsis on empty long cmd () 2020-08-26 09:18:51 -06:00
README.md Man pages won't have auto gen tag when option is disabled () 2020-04-29 11:15:55 -06:00
rest_docs.go doc: hide hidden parent flags () 2018-04-24 12:15:12 -04:00
rest_docs.md doc: add ReST doc generation () 2017-10-07 19:39:47 +02:00
rest_docs_test.go doc: hide hidden parent flags () 2018-04-24 12:15:12 -04:00
util.go Correct a typo in doc/util.go () 2020-08-10 22:17:29 -06:00
yaml_docs.go YAML documentation contains "Usage" () 2020-06-15 16:51:03 -06:00
yaml_docs.md Fix () 2017-04-19 14:39:58 +02:00
yaml_docs_test.go YAML documentation contains "Usage" () 2020-06-15 16:51:03 -06:00

Documentation generation

Options

DisableAutoGenTag

You may set cmd.DisableAutoGenTag = true to entirely remove the auto generated string "Auto generated by spf13/cobra..." from any documentation source.