confext

package
v0.0.439 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyEnvOverrides

func ApplyEnvOverrides[T any](prefix string, c *T, delim string) error

ApplyEnvOverrides overrides field values from environment variables

fields must be tagged with `env:"env_key"`

only works on exported fields

fields without an env tag are ignored fields with an `env:"-"` tag are ignore

sub-structs are recursively parsed (if they have an env tag) and the env-variable keys are delimited by the delim parameter sub-structs with `env:""` are also parsed, but the delimited is skipped (they are handled as if they were one level higher)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL