Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ViperSetup ¶
type ViperSetup struct {
// contains filtered or unexported fields
}
ViperSetup stores config requires to fully setup an aduu app.
func SetupViper ¶
func SetupViper(appName string) (setup *ViperSetup, v *viper.Viper)
SetupViper sets up viper for immediate use.
func (*ViperSetup) IsWriteConfigSet ¶
func (setup *ViperSetup) IsWriteConfigSet() bool
IsWriteConfigSet return whether the config write flag was set.
func (*ViperSetup) SetupKlogFlags ¶
func (setup *ViperSetup) SetupKlogFlags(cmd *cobra.Command)
SetupKlogFlags adds klog flags to the given command together with a -w flag. The -w flag enables saving the current viper state to the default config file.
func (*ViperSetup) WriteConfig ¶
func (setup *ViperSetup) WriteConfig() (err error)
Click to show internal directories.
Click to hide internal directories.