Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct {
Prefix string
}
Source implements the dials.Source interface to set configuration from environment variables.
func (*Source) Value ¶
Value fills in the user-provided config struct using environment variables. It looks up the environment variable to read into a given struct field by using that field's `dialsenv` struct tag if present, then its `dials` tag if present, and finally its name. If the struct field's name is used, Value assumes the name is in Go-style camelCase (e.g., "JSONFilePath") and converts it to UPPER_SNAKE_CASE. (The casing of `dialsenv` and `dials` tags is left unchanged.)
Click to show internal directories.
Click to hide internal directories.