envutil

package
v0.4.14 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvPrefix

func EnvPrefix(name string) string

func Merge added in v0.4.13

func Merge(sets ...[]string) []string

This function merges environment entry sets left to right, so a later set overrides an earlier one. Entries use the KEY=VALUE form, split on the first "=". A repeated key keeps its first-seen position and takes its last-seen value, so Merge([]string{"A=1"}, []string{"A=2"}) returns ["A=2"].

An entry with no "=" is passed through unchanged in place and is never used as a merge key. Keys are case sensitive.

The result is newly allocated and never aliases an input. It has a time complexity of O(n) in the total number of entries.

Types

This section is empty.

Jump to

Keyboard shortcuts

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