envir

package
v0.0.0-...-b872246 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DevboxCache         = "DEVBOX_CACHE"
	DevboxFeaturePrefix = "DEVBOX_FEATURE_"
	DevboxGateway       = "DEVBOX_GATEWAY"
	// DevboxLatestVersion is the latest version available of the devbox CLI binary.
	// NOTE: it should NOT start with v (like 0.4.8)
	DevboxLatestVersion  = "DEVBOX_LATEST_VERSION"
	DevboxRegion         = "DEVBOX_REGION"
	DevboxSearchHost     = "DEVBOX_SEARCH_HOST"
	DevboxShellEnabled   = "DEVBOX_SHELL_ENABLED"
	DevboxShellStartTime = "DEVBOX_SHELL_START_TIME"
	DevboxVM             = "DEVBOX_VM"

	LauncherVersion = "LAUNCHER_VERSION"
	LauncherPath    = "LAUNCHER_PATH"

	GitHubUsername = "GITHUB_USER_NAME"
	SSHTTY         = "SSH_TTY"

	XDGDataHome   = "XDG_DATA_HOME"
	XDGConfigHome = "XDG_CONFIG_HOME"
	XDGCacheHome  = "XDG_CACHE_HOME"
	XDGStateHome  = "XDG_STATE_HOME"
)
View Source
const (
	Env   = "ENV"
	Home  = "HOME"
	Path  = "PATH"
	Shell = "SHELL"
	User  = "USER"
)

system

Variables

This section is empty.

Functions

func DoNotTrack

func DoNotTrack() bool

func GetValueOrDefault

func GetValueOrDefault(key, def string) string

GetValueOrDefault gets the value of an environment variable. If it's empty, it will return the given default value instead.

func IsCI

func IsCI() bool

func IsDevboxCloud

func IsDevboxCloud() bool

func IsDevboxShellEnabled

func IsDevboxShellEnabled() bool

func IsInBrowser

func IsInBrowser() bool

func MapToPairs

func MapToPairs(m map[string]string) []string

MapToPairs creates a slice of environment variable "key=value" pairs from a map.

func PairsToMap

func PairsToMap(pairs []string) map[string]string

PairsToMap creates a map from a slice of "key=value" environment variable pairs. Note that maps are not ordered, which can affect the final variable values when pairs contains duplicate keys.

Types

This section is empty.

Jump to

Keyboard shortcuts

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