Documentation
¶
Index ¶
- func BindEnvAlias(fieldPath string, aliases ...string)
- func BindFlag(fieldPath string, flag *pflag.Flag)
- func Load(configData string, cfg interface{}) error
- func LoadEnv(prefix string, cfg interface{}) error
- func LoadFile(configFilePath string, cfg interface{}) error
- func LoadFlags(cfg interface{}) error
- func RegisterMarshaler[T any](ta *Taurus, marshaler func(T) ([]byte, error))
- func RegisterUnmarshaler[T any](ta *Taurus, unmarshaler func(*T, []byte) error)
- func SetEnvPrefix(prefix string)
- func SetExpandEnv(expand bool)
- func SetStripUnmarshaledStrings(strip bool)
- type Taurus
- func (t *Taurus) BindEnvAlias(fieldPath string, aliases ...string)
- func (t *Taurus) BindFlag(fieldPath string, flag *pflag.Flag)
- func (t *Taurus) Load(configData string, cfg interface{}) error
- func (t *Taurus) LoadEnv(prefix string, cfg interface{}) error
- func (t *Taurus) LoadFile(configFilePath string, cfg interface{}) error
- func (t *Taurus) LoadFlags(cfg interface{}) error
- func (t *Taurus) SetEnvPrefix(prefix string)
- func (t *Taurus) SetExpandEnv(expand bool)
- func (t *Taurus) SetStripUnmarshaledStrings(strip bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindEnvAlias ¶
func RegisterMarshaler ¶
RegisterMarshaler registers a custom marshaler for the type argument T. If the parameter "t" is nil, the default Taurus instance is used.
func RegisterUnmarshaler ¶
RegisterUnmarshaler registers a custom unmarshaler for the type argument T. If the parameter "t" is nil, the default Taurus instance is used.
func SetEnvPrefix ¶
func SetEnvPrefix(prefix string)
func SetExpandEnv ¶
func SetExpandEnv(expand bool)
func SetStripUnmarshaledStrings ¶
func SetStripUnmarshaledStrings(strip bool)
Types ¶
type Taurus ¶
type Taurus struct {
// contains filtered or unexported fields
}
func (*Taurus) BindEnvAlias ¶
func (*Taurus) SetEnvPrefix ¶
func (*Taurus) SetExpandEnv ¶
func (*Taurus) SetStripUnmarshaledStrings ¶
Click to show internal directories.
Click to hide internal directories.