env

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 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 GetFloat64 added in v0.10.21

func GetFloat64(key string, fallback float64) float64

GetFloat64 env var or fallback as float64

func GetInt

func GetInt(key string, fallback int) int

GetInt env var or fallback as int

func GetInt64 added in v0.10.21

func GetInt64(key string, fallback int64) int64

GetInt64 env var or fallback as int64

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 MustGetFloat64 added in v0.10.21

func MustGetFloat64(key string) float64

MustGetFloat64 env var as float64 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 MustGetInt64 added in v0.10.21

func MustGetInt64(key string) int64

MustGetInt64 env var as int64 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