env

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map map[string]*Var

Map is a map of environment variables. We use a *Var as map values are not addressable, i.e. cannot be modified directly.

func (Map) SetEnv

func (m Map) SetEnv() error

SetEnv reads and sets the provided list of env vars based on the Map.

type Var

type Var struct {
	Value        string
	DefaultValue string
	IsInteger    bool
	IntValue     int
	IsBoolean    bool
	BooleanValue bool
	OneOf        []string
	Optional     bool // controls whether an env variable can be missing from the .env file but still declared
}

Var describes an environment variable and its configuration.

Jump to

Keyboard shortcuts

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