Documentation
¶
Index ¶
- func CheckHelpFlag(output *strings.Builder, usageFunc func()) bool
- func HandleCommandOutput(fn func() (string, error)) func() int
- func HandleFlagError(output *strings.Builder, err error) (string, error)
- func LoadGolden(t *testing.T, filename string) string
- func ValidateArgs(args []string, v Validator) error
- func ValidatePokemonArgs(args []string) error
- func WrapText(text string, width int) string
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHelpFlag ¶ added in v1.8.5
func HandleCommandOutput ¶ added in v1.2.4
HandleCommandOutput takes a function that returns (string, error) and wraps it in a no-argument function that writes the returned string to stdout if there's no error, or to stderr if there is. It returns an exit code: 0 on success, 1 on error.
func HandleFlagError ¶ added in v1.6.1
func ValidateArgs ¶ added in v1.8.10
func ValidatePokemonArgs ¶
ValidatePokemonArgs validates the command line arguments
Types ¶
Click to show internal directories.
Click to hide internal directories.