env

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Overview

Package env is the one door for environment variables owned by codeaf.

Get and Lookup are the STATIC door: their names are constants known by the caller and a foreign name is a programming error. Value and LookupValue are the DYNAMIC door: settings tables and key references may contain either a codeaf name or a provider/system name, so foreign names pass through exactly as os records them. Both doors give a CODEAF_ name the one-release fallback to its AFORGE_ spelling when the new spelling is unset or empty. // legacy-name

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvironWithout

func EnvironWithout(names ...string) []string

EnvironWithout returns the process environment without the named variables. Owned names remove both spellings; foreign names remove only themselves.

func Get

func Get(name string) string

Get reads a statically known codeaf variable with its legacy fallback.

func Legacy

func Legacy(name string) string

Legacy returns the former spelling of an owned variable.

func Lookup

func Lookup(name string) (string, bool)

Lookup is Get with the presence bit of the spelling that supplied the value.

func LookupValue

func LookupValue(name string) (string, bool)

LookupValue is Value with os.LookupEnv's presence bit.

func Spelling

func Spelling(name string) (string, bool)

Spelling names the spelling that supplied an owned variable's value: the current one when it is set and non-empty, the former one when only it is set. A receipt that says which variable answered has to say the one the person actually wrote, or it points them at a row they never set. When neither answers it is the current name, unset.

func Value

func Value(name string) string

Value reads a runtime-supplied name. Foreign variables are read plainly.

Types

This section is empty.

Jump to

Keyboard shortcuts

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