env

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupFile added in v0.1.0

func BackupFile(path string) error

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