dotenv

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package dotenv parses .env files into a map for the SDK's configuration cascade. It deliberately never mutates the process environment: a library must not surprise its host program (or other libraries in it) with variables that appear out of nowhere depending on the working directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(path string) (map[string]string, error)

Parse reads a .env file and returns its key/value pairs. It supports the common .env dialect: KEY=value lines, optional "export " prefixes, blank and #-comment lines, one balanced pair of surrounding quotes (single or double), and inline " #" comments on unquoted values. It never touches the process environment.

On an oversized line Parse returns the entries parsed up to that point alongside the scanner error, so a broken tail cannot silently drop the rest of the file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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