Documentation
¶
Overview ¶
Package config defines a manager to manage common configuration.
Index ¶
- type Manager
- func (mgr *Manager) AddConfigFlag(persistentFlags *pflag.FlagSet)
- func (mgr *Manager) Flags() *pflag.FlagSet
- func (mgr *Manager) InitFlags(cfg any) error
- func (mgr *Manager) ReadFromFile(fs *pflag.FlagSet) error
- func (mgr *Manager) Unmarshal(config interface{}) error
- func (mgr *Manager) Viper() *viper.Viper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the configuration manager.
func (*Manager) AddConfigFlag ¶
AddConfigFlag adds the config flag to the persistent root flagset.
func (*Manager) ReadFromFile ¶
ReadFromFile reads the config from the file set with the `config` flag. Use `AddConfigFlag` to add the config flag to the root flagset.