Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AppHelpTemplate = `` /* 980-byte string literal not displayed */
AppHelpTemplate contains the modified template for the main app
var CommandHelpTemplate = `` /* 403-byte string literal not displayed */
CommandHelpTemplate contains the modified template for a command
var HelpCommandAction = cli.ActionFunc(helpAction)
HelpCommandAction is the action function of the overwritten help command.
var SubcommandHelpTemplate = `` /* 531-byte string literal not displayed */
SubcommandHelpTemplate contains the modified template for a sub command Note that the weird "|||\n|---|---|" syntax sets up a markdown table with empty headers.
Functions ¶
func FlagNamePrefixer ¶
FlagNamePrefixer converts a full flag name and its placeholder into the help message flag prefix. This is used by the default FlagStringer.
This method clones urflave/cli functionality but adds a new line at the end.
func HelpCommand ¶
HelpCommand overwrites default urfvafe/cli help command to support one or multiple subcommands like:
step help step help crypto step help crypto jwt step help crypto jwt sign ...
func HelpPrinter ¶
HelpPrinter overwrites cli.HelpPrinter and prints the formatted help to the terminal.
Types ¶
type Argument ¶
Argument specifies the Name, Usage, and whether or not an Argument is required or not
type Arguments ¶
type Arguments []Argument
Arguments is an array of Argument structs that specify which arguments are accepted by a Command
type RenderMode ¶
type RenderMode int
RenderMode enumerates different line breaks modes.
const ( // RenderModeKeepBreaks will keep the line breaks in the docs. RenderModeKeepBreaks RenderMode = iota // RenderModeBreakLines will automatically wrap the lines. RenderModeBreakLines )
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer implements a custom markdown renderer for blackfriday.
func (*Renderer) RenderFooter ¶
RenderFooter implements blackfriday.Renderer interface.
func (*Renderer) RenderHeader ¶
RenderHeader implements blackfriday.Renderer interface.
func (*Renderer) RenderNode ¶
RenderNode implements blackfriday.Renderer interface.
type Report ¶
type Report struct {
Report []*Section `json:"report"`
}
Report holds together a report of sections
func (*Report) PerHeadline ¶
PerHeadline returns all sections across commands/pages with the same headline