Documentation ¶
Overview ¶
Package cobradoc implements alternative documentation generator for cobra.
Index ¶
Constants ¶
View Source
const ( EXAMPLES = "Examples" FILES = "Files" ENVIRONMENT = "Environment" BUGS = "Reporting Bugs" AUTHORS = "Authors" COPYRIGHT = "Copyright" LICENSE = "License" HISTORY = "History" SEEALSO = "See Also" NOTES = "Notes" )
Common titles for extra sections Section title can be any string, however these ones are used frequently
Variables ¶
This section is empty.
Functions ¶
func GetDocument ¶
Generate single documentation page for given command tree
Types ¶
type ExtraSection ¶
Extra section contents
type Options ¶
type Options struct { // Page section number (defaults to "1") // In man page, defines manual page section number // In markdown, ignored SectionNumber string // Name of the tool (defaults to cmd.Name()) // Used in numerous places Name string // Creation date (defaults to current month and year) // In man page, located at the center of the bottom line // In markdown, ignored Date string // BCP 47 language for converting the tool name to title case (defaults to "en") Language string // Page header (defaults to "{Name} Manual") // In man page, located at the center of the top line // In markdown, defines page header Header string // In man page, located at the left corner of the bottom line // In markdown, ignored Footer string // Short description of the tool (defaults to cmd.Short) // In man page, located in NAME section // In markdown, located in the first section, used if LongDescription is unset ShortDescription string // Long description of the tool (defaults to cmd.Long) // In man page, located in DESCRIPTION section // In markdown, located in the first section LongDescription string // Array of additional sections (optional) // Sections are added to the end of the document ExtraSections []ExtraSection }
Generation options All fields have reasonable defaults
Click to show internal directories.
Click to hide internal directories.