dotenv

package
v0.19.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(environ []string, systemLookup func(string) string) (map[string]string, error)

Evaluate an array of key=value strings in the dotenv syntax, and return a map of evaluated variables

func AllRaw

func AllRaw(environ []string) map[string]string

Evaluate an array of key=value strings in the dotenv syntax, in raw mode: values are left unprocessed.

func Exists

func Exists(environ []string, name string) bool

func Lookup

func Lookup(environ []string, name string, systemLookup func(string) string) (string, bool, error)

Evaluate an array of key=value strings in the dotenv syntax, and return the value of the specified variable

func LookupRaw

func LookupRaw(environ []string, name string) (string, bool)

Evaluate an array of key=value strings in the dotenv syntax, and return the value of the specified variable in raw mode

Types

type GraphEvaluator

type GraphEvaluator struct {
	// contains filtered or unexported fields
}

GraphEvaluator evaluates dotenv variables with dependency resolution and cycle detection

func NewGraphEvaluator

func NewGraphEvaluator(environ []string, systemLookup func(string) string) (*GraphEvaluator, error)

NewGraphEvaluator creates a new graph-based evaluator

func (*GraphEvaluator) All

func (g *GraphEvaluator) All() (map[string]string, error)

All returns all variables, expanded

func (*GraphEvaluator) Lookup

func (g *GraphEvaluator) Lookup(name string) (string, bool, error)

Lookup gets the expanded value of a variable with memoization

Jump to

Keyboard shortcuts

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