env

package
v0.0.66 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEnvironmentVariableIsEmpty = errors.New("env: environment variable is empty")

Functions

func Bool

func Bool(key string) (bool, error)

func BoolOrDefault

func BoolOrDefault(key string, defaultValue bool) bool

func Float32

func Float32(key string) (float32, error)

func Float32OrDefault

func Float32OrDefault(key string, defaultValue float32) float32

func Float64

func Float64(key string) (float64, error)

func Float64OrDefault

func Float64OrDefault(key string, defaultValue float64) float64

func Int

func Int(key string) (int, error)

func Int32

func Int32(key string) (int32, error)

func Int32OrDefault

func Int32OrDefault(key string, defaultValue int32) int32

func Int64

func Int64(key string) (int64, error)

func Int64OrDefault

func Int64OrDefault(key string, defaultValue int64) int64

func IntOrDefault

func IntOrDefault(key string, defaultValue int) int

func MustBool

func MustBool(key string) bool

func MustFloat32

func MustFloat32(key string) float32

func MustFloat64

func MustFloat64(key string) float64

func MustInt

func MustInt(key string) int

func MustInt32

func MustInt32(key string) int32

func MustInt64

func MustInt64(key string) int64

func MustSecond

func MustSecond(key string) time.Duration

func MustString

func MustString(key string) string

func MustUint

func MustUint(key string) uint

func MustUint32

func MustUint32(key string) uint32

func MustUint64

func MustUint64(key string) uint64

func Second

func Second(key string) (time.Duration, error)

func SecondOrDefault

func SecondOrDefault(key string, defaultValue time.Duration) time.Duration

func String

func String(key string) (string, error)

func StringOrDefault

func StringOrDefault(key string, defaultValue string) string

func Uint

func Uint(key string) (uint, error)

func Uint32

func Uint32(key string) (uint32, error)

func Uint32OrDefault

func Uint32OrDefault(key string, defaultValue uint32) uint32

func Uint64

func Uint64(key string) (uint64, error)

func Uint64OrDefault

func Uint64OrDefault(key string, defaultValue uint64) uint64

func UintOrDefault

func UintOrDefault(key string, defaultValue uint) uint

Types

This section is empty.

Jump to

Keyboard shortcuts

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