Documentation ¶
Index ¶
- func Read()
- func Set[T Configurable](take *T, envKey, flagKey string, def T)
- func SetEnv[T Configurable](take *T, envKey string, def T)
- func SetEnvValidate[T Configurable](take *T, envKey string, def T, validator func(*T) error)
- func SetFlag[T Configurable](take *T, flagKey string, def T)
- func SetFlagValidate[T Configurable](take *T, flagKey string, def T, validator func(*T) error)
- func SetPair[K Configurable, V Configurable](take *KeyValue[K, V], envKey, flagKey string, def KeyValue[K, V])
- func SetPairValidate[K Configurable, V Configurable](take *KeyValue[K, V], envKey, flagKey string, def KeyValue[K, V], ...)
- func SetValidate[T Configurable](take *T, envKey, flagKey string, def T, validator func(*T) error)
- type Configurable
- type KeyValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Set ¶
func Set[T Configurable](take *T, envKey, flagKey string, def T)
func SetEnv ¶
func SetEnv[T Configurable](take *T, envKey string, def T)
func SetEnvValidate ¶ added in v1.2.0
func SetEnvValidate[T Configurable](take *T, envKey string, def T, validator func(*T) error)
func SetFlag ¶
func SetFlag[T Configurable](take *T, flagKey string, def T)
func SetFlagValidate ¶ added in v1.2.0
func SetFlagValidate[T Configurable](take *T, flagKey string, def T, validator func(*T) error)
func SetPair ¶ added in v1.2.0
func SetPair[K Configurable, V Configurable](take *KeyValue[K, V], envKey, flagKey string, def KeyValue[K, V])
func SetPairValidate ¶ added in v1.2.0
func SetPairValidate[K Configurable, V Configurable](take *KeyValue[K, V], envKey, flagKey string, def KeyValue[K, V], keyValidator func(*K) error, valueValidator func(*V) error, keyValueValidator func(*K, *V) error)
func SetValidate ¶ added in v1.2.0
func SetValidate[T Configurable](take *T, envKey, flagKey string, def T, validator func(*T) error)
Types ¶
type Configurable ¶
type KeyValue ¶
type KeyValue[K Configurable, V Configurable] struct { Key K Value V }
Click to show internal directories.
Click to hide internal directories.