envutil

package
v0.4.4 Latest Latest
Warning

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

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

Documentation

Overview

Package envutil provides environment variable helpers with fallback support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Getenv

func Getenv(primary string, legacy ...string) string

Getenv returns the value of the primary environment variable. If the primary is empty or unset, it tries each legacy alias in order and returns the first non-empty value found. Returns "" if none are set.

func Unsetenv

func Unsetenv(key string) error

Unsetenv removes the named environment variable from the environment. It is a thin wrapper around os.Unsetenv that returns any error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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