Documentation
¶
Index ¶
- func Config[T comparable](key string) func() T
- func Env(key string) func() string
- func EnvAs[T any](key string, converter func(string) T) func() T
- func EnvBool(key string) func() bool
- func EnvDuration(key string) func() time.Duration
- func EnvInt(key string) func() int
- func Try[T comparable](accessors ...Accessor[T]) T
- type Accessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Config ¶
func Config[T comparable](key string) func() T
TODO(ezekg) implement relay toml/yaml config file?
func EnvDuration ¶
func Try ¶
func Try[T comparable](accessors ...Accessor[T]) T
Types ¶
type Accessor ¶
type Accessor[T comparable] func() T
func Static ¶
func Static[T comparable](value T) Accessor[T]
Click to show internal directories.
Click to hide internal directories.