Documentation
¶
Index ¶
- func Address(key string, def types.Address) (v types.Address)
- func Bool(key string, def bool) bool
- func Duration(key string, def time.Duration) (v time.Duration)
- func Float64(key string, def float64) float64
- func HexBytes(key string, def []byte) []byte
- func HexBytesOfSize(key string, l int) ([]byte, error)
- func Int(key string, def int) (v int)
- func Int64(key string, def int64) int64
- func ReaderFromHexOrRandomOfSize(key string, size int) io.Reader
- func SetSeparatorKey(s string)
- func String(key, def string) string
- func Strings(key string, def []string) []string
- func Uint64(key string, def uint64) uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Address ¶
Address returns an address from the environment variable with the given key using types.AddressFromHex.
func Duration ¶
Duration returns a duration from the environment variable with the given key using time.ParseDuration.
func HexBytes ¶
HexBytes returns a byte slice from the environment variable with the given key using hex.DecodeString.
func SetSeparatorKey ¶
func SetSeparatorKey(s string)
SetSeparatorKey sets the environment variable key to read the separator from.
func String ¶
String returns a string from the environment variable with the given key. If the variable is not set, the default value is returned. Empty values are allowed and valid.
func Strings ¶
Strings returns a slice of strings from the environment variable with the given key. If the variable is not set, the default value is returned. The value is split by the separator defined in the CFG_ITEM_SEPARATOR. Values are trimmed of the separator before splitting. If the environment variable exists but is empty, an empty slice is returned.
Types ¶
This section is empty.