Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SnakeCharmer ¶
type SnakeCharmer struct {
// contains filtered or unexported fields
}
SnakeCharmer binds a viper instance to a cobra.Command instance
func NewSnakeCharmer ¶
func NewSnakeCharmer(envPrefix string, confName string) SnakeCharmer
NewSnakeCharmer constructs a new SnakeCharmer
func (SnakeCharmer) InitConfig ¶
func (sc SnakeCharmer) InitConfig(cmd *cobra.Command, confPath string) error
InitConfig imports values from viper into the input cmd object to form a single consistent view of config information. Passing an empty confPath will cause viper to look in the current and home directories for a config file.
Click to show internal directories.
Click to hide internal directories.