envconfig

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read[T any](holder *T, lookupEnv func(string) (string, bool)) error

Read reads the environment variables using lookupEnv function and assigns values to the Holder struct. If lookupEnv is not provided, os.LookupEnv is used. There are the following struct tags: - env:"-" - skips field - env:"NAME" - sets environment name to look for - prefix:"NAME" - sets prefix for embedded structs Types can implement the following interfaces to support custom values: - encoding.TextUnmarshaler - encoding.BinaryUnmarshaler - json.Unmarshaler

Types

This section is empty.

Jump to

Keyboard shortcuts

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