Documentation ¶
Index ¶
- Constants
- func AddFlagBool(cmd *cobra.Command, flag string, def bool, usage string) (b *bool)
- func AddFlagString(cmd *cobra.Command, flag string, def string, usage string) (s *string)
- func AddFlagStringSlice(cmd *cobra.Command, flag string, def []string, usage string) (s *[]string)
- func AddFlagUint16(cmd *cobra.Command, flag string, def uint16, usage string) (u *uint16)
- func InitConfig()
Constants ¶
View Source
const EnvPrefix = "CAM"
Variables ¶
This section is empty.
Functions ¶
func AddFlagBool ¶
AddFlagBool adds an uint16 flag to the command and registers with viper and cobra.
func AddFlagString ¶
AddFlagString adds an uint16 flag to the command and registers with viper and cobra.
func AddFlagStringSlice ¶ added in v0.2.0
AddFlagStringSlice adds an uint16 flag to the command and registers with viper and cobra.
func AddFlagUint16 ¶
AddFlagUint16 adds an uint16 flag to the command and registers with viper and cobra.
func InitConfig ¶
func InitConfig()
InitConfig initializes the viper config with sensible defaults for all of the CAM modules. It enables loading configuration settings from a config file named cam.yaml as well as the environment variables prefixed with EnvPrefix.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.