Documentation
¶
Overview ¶
Package flagbind provides helpers for cobra flag registration.
Package register provides helpers for cobra flag registration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LastJSON ¶
LastJSON registers the --last (int) and --json (bool) flag pair used by list-style commands.
Parameters:
- c: Cobra command to register on
- lastDefault: Default value for --last
- lastDescKey: YAML DescKey for the --last flag description
- jsonDescKey: YAML DescKey for the --json flag description
func StringFlag ¶
StringFlag registers a string flag with no shorthand.
Parameters:
- c: Cobra command to register on
- p: Pointer to the string variable
- name: Flag name constant
- descKey: YAML DescKey for the flag description
func StringFlagP ¶
StringFlagP registers a string flag with a shorthand letter.
Parameters:
- c: Cobra command to register on
- p: Pointer to the string variable
- name: Flag name constant
- short: Shorthand letter
- descKey: YAML DescKey for the flag description
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.