env

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Patch

func Patch(path, key, value string) error

func PatchAll

func PatchAll(path string, patches map[string]string, comments []string) error

PatchAll reads existing env from path, merges patches, and writes atomically via a temp file + rename. If path does not exist, starts from an empty env. comments may be nil (no-op). The original file's permissions are preserved.

func ScanComments

func ScanComments(path, mode string) ([]string, error)

ScanComments reads path and returns full-line comment lines per mode. mode: "all" | "blocks-only" | anything else → nil, nil

Types

This section is empty.

Jump to

Keyboard shortcuts

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