Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultWrap = 80
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hinter ¶
type Hinter interface {
Hint() (kind, hint string)
}
Hinter allows flag.Var or arg.Var implementations to customise the type and hint portion of the usage output, for example:
--flag=<kind> (hint)
Empty strings will remove either part from the output:
--flag=<kind> (hint) --flag (hint)
type Usable ¶
type Usable interface { Name() string Usage() string DefValue() string Value() interface{} // Describe is used to format the description of this Usable in the usage // statement according to the Usable's preferredtemplate. Flags are // formatted differently to args, but the inputs are the same. Describe(kind string, hint string) string }
Usable is a common interface that should support both flag.Flag and arg.Arg for the purpose of building a usage statement.
Click to show internal directories.
Click to hide internal directories.