Help us shape the future of Go! Take the 2026 Go Developer Survey

envfile

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

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

Parse reads .env content into a key-value map. content is the raw file content; returns parsed key/value pairs or an error.

func Patch

func Patch(content string, updates map[string]string) string

Patch updates .env content with the provided key/value pairs. content is the existing file content; updates supplies key/value pairs to merge. New keys are appended in sorted order and leave the result ending in a newline, so a later shell append cannot merge onto the last value; otherwise the input's final-newline state is kept.

Types

This section is empty.

Jump to

Keyboard shortcuts

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