-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelp_api.go
More file actions
76 lines (54 loc) · 2.81 KB
/
Copy pathhelp_api.go
File metadata and controls
76 lines (54 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package tinyflags
import "io"
// HideEnvs disables all env-var annotations in help output.
func (f *FlagSet) HideEnvs() { f.impl.HideEnvs() }
// Title sets the main title shown in usage output.
func (f *FlagSet) Title(s string) { f.Help().Title(s) }
// Authors sets the list of authors printed in help output.
func (f *FlagSet) Authors(s string) { f.Help().Authors(s) }
// Description sets the top description section of the help output.
func (f *FlagSet) Description(s string) { f.Help().Description(s) }
// Note sets the bottom note section of the help output.
func (f *FlagSet) Note(s string) { f.Help().Note(s) }
// HelpText sets the --help text.
func (f *FlagSet) HelpText(s string) { f.Help().HelpText(s) }
// DisableHelp disables the automatic --help flag.
func (f *FlagSet) DisableHelp() { f.Help().DisableHelp() }
// DisableVersion disables the automatic --version flag.
func (f *FlagSet) DisableVersion() { f.Help().DisableVersion() }
// SortedFlags enables sorted help output for static flags.
func (f *FlagSet) SortedFlags() { f.impl.SortedFlags(true) }
// SortedGroups enables sorted help output for dynamic groups.
func (f *FlagSet) SortedGroups() { f.impl.SortedGroups(true) }
// SetOneOfGroupVerbose toggles verbose OneOfGroup error messages.
func (f *FlagSet) SetOneOfGroupVerbose(enable bool) { f.impl.SetOneOfGroupVerbose(enable) }
// OneOfGroupVerbose reports whether OneOfGroup errors include conflicting flags.
func (f *FlagSet) OneOfGroupVerbose() bool { return f.impl.OneOfGroupVerbose() }
// SetOutput changes the destination writer for usage and error messages.
func (f *FlagSet) SetOutput(w io.Writer) { f.impl.SetOutput(w) }
// Output returns the current output writer.
func (f *FlagSet) Output() io.Writer { return f.impl.Output() }
// PrintUsage renders the top usage line.
func (f *FlagSet) PrintUsage(w io.Writer, mode FlagPrintMode) {
f.impl.PrintUsage(w, mode)
}
// PrintTitle renders the title above all help content.
func (f *FlagSet) PrintTitle(w io.Writer) { f.impl.PrintTitle(w) }
// PrintAuthors renders the author line if set.
func (f *FlagSet) PrintAuthors(w io.Writer) { f.impl.PrintAuthors(w) }
// PrintDescription renders the full description block.
func (f *FlagSet) PrintDescription(w io.Writer, indent, width int) {
f.impl.PrintDescription(w, indent, width)
}
// PrintStaticDefaults renders all static flag usage lines.
func (f *FlagSet) PrintStaticDefaults(w io.Writer, indent, col, width int) {
f.impl.PrintStaticDefaults(w, indent, col, width)
}
// PrintDynamicDefaults renders all dynamic flag usage lines.
func (f *FlagSet) PrintDynamicDefaults(w io.Writer, indent, col, width int) {
f.impl.PrintDynamicDefaults(w, indent, col, width)
}
// PrintNotes renders the notes section, if configured.
func (f *FlagSet) PrintNotes(w io.Writer, indent, width int) {
f.impl.PrintNotes(w, indent, width)
}