os

package
v0.1.0-rc.13 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(key, defaultValue string) string

GetEnv retrieves the value of an environment variable having the specified key. If the value is empty string, a specified default is returned instead.

func MustGetEnv

func MustGetEnv(key, defaultValue string) string

MustGetEnv retrieves the value of an environment variable having the specified key. If the value is empty string, a specified default is returned instead. It will panic if the defaultValue is empty too.

func MustGetEnvAsBool

func MustGetEnvAsBool(name string, defaultValue bool) bool

MustGetEnvAsBool attempts to parse a bool from a string value retrieved from the specified environment variable. If the environment variable is undefined, the specified default value is returned instead. If the environment variable is defined and its value cannot successfully be parsed as a bool, the function panics.

Types

This section is empty.

Jump to

Keyboard shortcuts

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