env

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(key string) bool

Exists return true if env var is defined

func Get

func Get(key, fallback string) string

Get env var or fallback

func GetBool

func GetBool(key string, fallback bool) bool

GetBool env var or fallback as bool

func GetInt

func GetInt(key string, fallback int) int

GetInt env var or fallback as int

func GetIntSlice

func GetIntSlice(key string, fallback []int) []int

GetIntSlice env var or fallback as []string

func GetStringSlice

func GetStringSlice(key string, fallback []string) []string

GetStringSlice env var or fallback as []string

func MustExists

func MustExists(key string)

MustExists panics if not exists

func MustGet

func MustGet(key string) string

MustGet env var or panic

func MustGetBool

func MustGetBool(key string) bool

MustGetBool env var as bool or panic

func MustGetGetIntSlice

func MustGetGetIntSlice(key string) []int

MustGetGetIntSlice env var as bool or panic

func MustGetInt

func MustGetInt(key string) int

MustGetInt env var as int or panic

func MustGetStringSlice

func MustGetStringSlice(key string) []string

MustGetStringSlice env var as bool or panic

Types

This section is empty.

Jump to

Keyboard shortcuts

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