Documentation
¶
Overview ¶
Package typedenv decodes OS environment variables into a struct
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Load ¶
Load reads operating system environment variables into a new instance of S, which must be a struct. Exported fields tagged with `env:"KEY"` are populated by looking up KEY in the environment; untagged fields are left at their zero value.
Supported field types: string, bool, the int and uint families, the float family, time.Duration, and url.URL.
Load returns an error if a tagged variable is missing from the environment, fails to parse, or targets an unexported field. Errors from multiple fields are joined.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.