MCPcopy
hub / github.com/alecthomas/kong / HelpOptions

Struct HelpOptions

help.go:33–64  ·  view source on GitHub ↗

HelpOptions for HelpPrinters.

Source from the content-addressed store, hash-verified

31
32// HelpOptions for HelpPrinters.
33type HelpOptions struct {
34 // Don't print top-level usage summary.
35 NoAppSummary bool
36
37 // Write a one-line summary of the context.
38 Summary bool
39
40 // Write help in a more compact, but still fully-specified, form.
41 Compact bool
42
43 // Tree writes command chains in a tree structure instead of listing them separately.
44 Tree bool
45
46 // Place the flags after the commands listing.
47 FlagsLast bool
48
49 // Indenter modulates the given prefix for the next layer in the tree view.
50 // The following exported templates can be used: kong.SpaceIndenter, kong.LineIndenter, kong.TreeIndenter
51 // The kong.SpaceIndenter will be used by default.
52 Indenter HelpIndenter
53
54 // Don't show the help associated with subcommands
55 NoExpandSubcommands bool
56
57 // Clamp the help wrap width to a value smaller than the terminal width.
58 // If this is set to a non-positive number, the terminal width is used; otherwise,
59 // the min of this value or the terminal width is used.
60 WrapUpperBound int
61
62 // ValueFormatter is used to format the help text of flags and positional arguments.
63 ValueFormatter HelpValueFormatter
64}
65
66// Apply options to Kong as a configuration option.
67func (h HelpOptions) Apply(k *Kong) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected