env

package
v0.5.17 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package env implements environment related functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func First added in v0.0.251

func First(keys ...string) string

First is shorthand for FirstOrDefault("", keys...).

func FirstOrDefault added in v0.0.251

func FirstOrDefault(def string, keys ...string) string

FirstOrDefault retrieves the value of the first present environment variable named by the keys. In case no variable is present, FirstOrDefault returns def.

func GitActionEventName added in v0.1.93

func GitActionEventName() string

func GitActionName added in v0.1.98

func GitActionName() string

func GitCommitSHA added in v0.1.93

func GitCommitSHA() string

func GitRepoAndOwner added in v0.1.98

func GitRepoAndOwner() string

func IS_GH_ACTION added in v0.1.93

func IS_GH_ACTION() bool

func IsCI

func IsCI() bool

IsCI reports whether the environment is a CI one.

Based on https://github.com/watson/ci-info/blob/c4f1553f254c78babef5c200c48569ede313b718/index.js

func IsSet added in v0.0.251

func IsSet(keys ...string) bool

IsSet reports whether any of the environment variables named by the keys is set.

func IsTruthy added in v0.0.251

func IsTruthy(keys ...string) bool

IsTruthy reports whether any of the values of the environment variables named by the keys evaluates to true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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