env

package
v0.49.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBoolEnv

func GetBoolEnv(value string, fallback bool) bool

GetBoolEnv converts the given value to the bool type and returns that value, or returns the specified fallback value if the value is empty.

func GetIntEnv

func GetIntEnv(value string, fallback int) int

GetIntEnv converts the given value to the integer type and returns that value, or returns the specified fallback value if the value is empty.

func GetNegativeBoolEnv

func GetNegativeBoolEnv(value string, fallback bool) bool

GetNegativeBoolEnv converts the given value to the bool type and returns the inverted value, or returns the specified fallback value if the value is empty.

func GetStringEnv

func GetStringEnv(value string, fallback string) string

GetStringEnv returns the same string value, or returns the given fallback value if the value is empty.

func ParseEnvs

func ParseEnvs(envs []string) map[string]string

Types

This section is empty.

Jump to

Keyboard shortcuts

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