Documentation
¶
Index ¶
- func Decode(v interface{}) error
- func Encode(v interface{}) error
- type Env
- func (e Env) Bool() bool
- func (e Env) BoolOrElse(v bool) bool
- func (e Env) Float32() float32
- func (e Env) Float32OrElse(v float32) float32
- func (e Env) Float64() float64
- func (e Env) Float64OrElse(v float64) float64
- func (e Env) Int() int
- func (e Env) Int16() int16
- func (e Env) Int16OrElse(v int16) int16
- func (e Env) Int32() int32
- func (e Env) Int32OrElse(v int32) int32
- func (e Env) Int64() int64
- func (e Env) Int64OrElse(v int64) int64
- func (e Env) Int8() int8
- func (e Env) Int8OrElse(v int8) int8
- func (e Env) IntOrElse(v int) int
- func (e Env) IsEmpty() bool
- func (e Env) MustBool() bool
- func (e Env) MustFloat32() float32
- func (e Env) MustFloat64() float64
- func (e Env) MustInt() int
- func (e Env) MustInt16() int16
- func (e Env) MustInt32() int32
- func (e Env) MustInt64() int64
- func (e Env) MustInt8() int8
- func (e Env) MustUint() uint
- func (e Env) MustUint16() uint16
- func (e Env) MustUint32() uint32
- func (e Env) MustUint64() uint64
- func (e Env) MustUint8() uint8
- func (e Env) String() string
- func (e Env) StringOrElse(v string) string
- func (e Env) Uint() uint
- func (e Env) Uint16() uint16
- func (e Env) Uint16OrElse(v uint16) uint16
- func (e Env) Uint32() uint32
- func (e Env) Uint32OrElse(v uint32) uint32
- func (e Env) Uint64() uint64
- func (e Env) Uint64OrElse(v uint64) uint64
- func (e Env) Uint8() uint8
- func (e Env) Uint8OrElse(v uint8) uint8
- func (e Env) UintOrElse(v uint) uint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Env ¶
type Env string
Env is a wrapper for os.Getenv
func (Env) BoolOrElse ¶
BoolOrElse returns the value of the environment variable as a bool or the default value
func (Env) Float32OrElse ¶
Float32OrElse returns the value of the environment variable as a float32 or the default value
func (Env) Float64OrElse ¶
Float64OrElse returns the value of the environment variable as a float64 or the default value
func (Env) Int16OrElse ¶
Int16OrElse returns the value of the environment variable as an int16 or the default value
func (Env) Int32OrElse ¶
Int32OrElse returns the value of the environment variable as an int32 or the default value
func (Env) Int64OrElse ¶
Int64OrElse returns the value of the environment variable as an int64 or the default value
func (Env) Int8OrElse ¶
Int8OrElse returns the value of the environment variable as an int8 or the default value
func (Env) IntOrElse ¶
IntOrElse returns the value of the environment variable as an int or the default value
func (Env) MustFloat32 ¶
MustFloat32 returns the value of the environment variable as a float32 or panics
func (Env) MustFloat64 ¶
MustFloat64 returns the value of the environment variable as a float64 or panics
func (Env) MustInt16 ¶
MustInt16 returns the value of the environment variable as an int16 or panics
func (Env) MustInt32 ¶
MustInt32 returns the value of the environment variable as an int32 or panics
func (Env) MustInt64 ¶
MustInt64 returns the value of the environment variable as an int64 or panics
func (Env) MustUint16 ¶
MustUint16 returns the value of the environment variable as an uint16 or panics
func (Env) MustUint32 ¶
MustUint32 returns the value of the environment variable as an uint32 or panics
func (Env) MustUint64 ¶
MustUint64 returns the value of the environment variable as an uint64 or panics
func (Env) MustUint8 ¶
MustUint8 returns the value of the environment variable as an uint8 or panics
func (Env) StringOrElse ¶
StringOrElse returns the value of the environment variable or the default value
func (Env) Uint16OrElse ¶
Uint16OrElse returns the value of the environment variable as an uint16 or the default value
func (Env) Uint32OrElse ¶
Uint32OrElse returns the value of the environment variable as an uint32 or the default value
func (Env) Uint64OrElse ¶
Uint64OrElse returns the value of the environment variable as an uint64 or the default value
func (Env) Uint8OrElse ¶
Uint8OrElse returns the value of the environment variable as an uint8 or the default value
func (Env) UintOrElse ¶
UintOrElse returns the value of the environment variable as an uint or the default value