Documentation ¶
Index ¶
- func ViperAddArgument(cmd *cobra.Command, a Argument) error
- func ViperAddArguments(cmd *cobra.Command, aList []Argument) error
- func ViperConfig(envPrefix, configName string) error
- type ArgType
- type Argument
- type Config
- type ConfigError
- type ConfigNotSupportedProtocolError
- type EmptyCmdArgumentError
- type NoDefaultSetError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ViperAddArgument ¶
ViperAddArgument provides a data driven way to add cli arguments
func ViperAddArguments ¶
ViperAddArguments allows you to pass in many argument configs
func ViperConfig ¶
ViperConfig will help configure a project. This includes setting the environment variable prefix, plus the default config file name. For example:
cli.ViperConfig("ears")
Types ¶
type ConfigError ¶
type ConfigError struct { Err error // contains filtered or unexported fields }
func (*ConfigError) Error ¶
func (c *ConfigError) Error() string
func (*ConfigError) Unwrap ¶
func (c *ConfigError) Unwrap() error
type ConfigNotSupportedProtocolError ¶
type ConfigNotSupportedProtocolError struct {
// contains filtered or unexported fields
}
func (*ConfigNotSupportedProtocolError) Error ¶
func (e *ConfigNotSupportedProtocolError) Error() string
type EmptyCmdArgumentError ¶
type EmptyCmdArgumentError struct { }
func (*EmptyCmdArgumentError) Error ¶
func (e *EmptyCmdArgumentError) Error() string
type NoDefaultSetError ¶
type NoDefaultSetError struct { }
func (*NoDefaultSetError) Error ¶
func (e *NoDefaultSetError) Error() string
Click to show internal directories.
Click to hide internal directories.