envfile

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package envfile provides a simple dotenv file parser.

Supported syntax:

KEY=value
KEY="quoted value"
KEY='single quoted'
export KEY=value
KEY=value # inline comment (stripped for unquoted values)
# full-line comments

Inline comments require a space before # (KEY=val#tag is preserved). Mismatched quotes are treated as literal characters.

Not supported: multiline values, escape sequences (\n, \t), variable expansion (${VAR}).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(path string) error

Load reads a dotenv file and sets each entry in the process environment. It permanently modifies the process environment via os.Setenv.

Types

This section is empty.

Jump to

Keyboard shortcuts

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