Documentation
¶
Overview ¶
Package env implements environment related functionality.
Index ¶
- func First(keys ...string) string
- func FirstOrDefault(def string, keys ...string) string
- func GitActionEventName() string
- func GitActionName() string
- func GitCommitSHA() string
- func GitRepoAndOwner() string
- func IS_GH_ACTION() bool
- func IsCI() bool
- func IsSet(keys ...string) bool
- func IsTruthy(keys ...string) bool
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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.