Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LongDescriptions ¶ added in v6.3.0
LongDescriptions parses a Go source file and returns a map from each urfave/cli flag's Name field to its long docs description, derived from the leading doc comment directly above the flag's composite literal.
Convention: a // comment block directly above an &cli.XFlag{...} literal is treated as the long docs description. Lines within a paragraph are joined with spaces; paragraphs (separated by an empty // line) are joined with "\n\n". A blank line in the source between the comment and the literal breaks the association.
This helper is intentionally format-agnostic: callers are responsible for merging the result into their docs format of choice (YAML, JSON, markdown, etc.).
Types ¶
type CliTemplate ¶
type CliTemplate struct {
Name string
Version string
Description string
Usage string
UsageText string
GlobalArgs []*PluginArg
}
func GetTemplateData ¶
func GetTemplateData(app *cli.Command) *CliTemplate