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 ValidateAbilityArgs(args []string) error
- func ValidateBerryArgs(args []string) error
- func ValidateCardArgs(args []string) error
- func ValidateItemArgs(args []string) error
- func ValidateMoveArgs(args []string) error
- func ValidateNaturesArgs(args []string) error
- func ValidatePokemonArgs(args []string) error
- func ValidateSearchArgs(args []string) error
- func ValidateSpeedArgs(args []string) error
- func ValidateTypesArgs(args []string) error
- func WrapText(text string, width int) string
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 ValidateAbilityArgs ¶
ValidateAbilityArgs validates the command line arguments
func ValidateBerryArgs ¶ added in v1.7.3
ValidateBerryArgs validates the command line arguments
func ValidateCardArgs ¶ added in v1.8.0
ValidateCardArgs validates the command line arguments
func ValidateItemArgs ¶ added in v1.4.0
ValidateItemArgs validates the command line arguments
func ValidateMoveArgs ¶
ValidateMoveArgs validates the command line arguments
func ValidateNaturesArgs ¶
ValidateNaturesArgs validates the command line arguments
func ValidatePokemonArgs ¶
ValidatePokemonArgs validates the command line arguments
func ValidateSearchArgs ¶
ValidateSearchArgs validates the command line arguments
func ValidateSpeedArgs ¶ added in v1.5.0
ValidateSpeedArgs validates the command line arguments
func ValidateTypesArgs ¶
ValidateTypesArgs validates the command line arguments
Types ¶
This section is empty.