env

package
v0.8.18-rc-2 Latest Latest
Warning

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

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

Documentation

Overview

Package env provides helpers for reading earth's environment variables, including backwards-compatible support for the deprecated EARTHLY_ prefix.

Index

Constants

View Source
const DeprecatedPrefix = "EARTHLY_"

DeprecatedPrefix is the legacy environment variable prefix that is being replaced by Prefix.

View Source
const Prefix = "EARTH_"

Prefix is the current environment variable prefix.

Variables

This section is empty.

Functions

func DeprecatedWarnings

func DeprecatedWarnings() []string

DeprecatedWarnings returns a deprecation warning message for each DeprecatedPrefix-prefixed variable present in the current environment, sorted for deterministic output.

NOTE: This is a temporary shim to support the EARTHLY_ -> EARTH_ migration. Remove it (and its tests) once EARTHLY_ support is officially dropped.

func Lookup

func Lookup(suffix string) (string, bool)

Lookup returns the value of the environment variable identified by suffix, preferring the current Prefix and falling back to the deprecated DeprecatedPrefix.

NOTE: the DeprecatedPrefix fallback is a temporary shim to support the EARTHLY_ -> EARTH_ migration; drop it once EARTHLY_ support is officially removed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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