env

package
v0.2.52 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

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