Documentation
¶
Overview ¶
The above code is a Go package that provides functions for retrieving environment variables with type conversion and fallback values.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Env ¶
func Env[T EnvValueType](key string, fallback T) T
The `Env` function retrieves the value of an environment variable and provides a fallback value if the variable is not set.
func EnvWithConverter ¶
func EnvWithConverter[T EnvValueType](key string, converter EnvConverter[T]) T
The function `EnvWithConverter` retrieves an environment variable value and converts it to a specified type using a provided converter function.
Types ¶
type EnvConverter ¶
type EnvValueType ¶
The type EnvValueType represents a value that can be an integer, unsigned integer, floating-point number, boolean, string, or time.
Click to show internal directories.
Click to hide internal directories.