dotenv

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MPL-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvaluateExpressionValue

func EvaluateExpressionValue(eval evaluator.ExpressionEvaluator, value string) string

EvaluateExpressionValue evaluates value with eval, with deferred evaluation on, so that secrets resolve now. It returns "<ERROR: ...>" when the evaluation fails, and an empty string when the result is nil.

func Parse

func Parse(content string) map[string]string

Parse returns the KEY=VALUE lines of dotenv content as a map. It skips comments, blank lines and lines that have no "=".

func ShouldUseCache

func ShouldUseCache(lookupEnv func(string) (string, bool)) bool

ShouldUseCache reports whether to use a cached value again, from the NO_CACHE variable that lookupEnv reads. The cache is on by default. Set NO_CACHE=1 or NO_CACHE=true to turn it off.

func WarnOnLoosePermissions

func WarnOnLoosePermissions(w io.Writer, goos, path string, mode os.FileMode)

WarnOnLoosePermissions writes a warning to w when the group or other users can access the file at path. It does nothing when goos is "windows", because NTFS permissions do not use the FileMode bits.

Types

This section is empty.

Jump to

Keyboard shortcuts

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