Documentation ¶
Index ¶
Constants ¶
View Source
const Help = `` /* 127-byte string literal not displayed */
Help is the recommended help string for header flags.
View Source
const NameLong = "header"
NameLong is the recommanded long name for a header flag.
View Source
const NameShort = "H"
NameShort is the recommended short name for a header flag.
View Source
const Type = "stringSlice"
Type is the type expected by spf13/pflag for these data.
Variables ¶
View Source
var ErrFormat = errors.New(`header value is not a "name: value" string`)
ErrFormat is returned on ill-formatted header flag values.
Functions ¶
func HeaderFlagP ¶
func HeaderFlagP(header *Header)
HeaderFlagP initializes a global default header flag.
Types ¶
type Header ¶
Header supports parsing HTTP headers as CLI arguments using spf13/pflag.
If the same header is passed multiple times on the CLI, the values are aggregated under the header key, not replaced.
Click to show internal directories.
Click to hide internal directories.