env

package
v0.0.280-pre-2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 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 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