Documentation ¶
Overview ¶
Package env
Package env
Index ¶
- func GetEnv(key string) string
- func GetEnvs(keys ...string) []string
- func IsEnvEqual(env, dst string) bool
- func SetEnvContext(c context.Context, key, val string) context.Context
- type EnvLoader
- func (e *EnvLoader) Bool() bool
- func (e *EnvLoader) Float32() float32
- func (e *EnvLoader) Float64() float64
- func (e *EnvLoader) Get(key string) *EnvLoader
- func (e *EnvLoader) GetValue(key string) string
- func (e *EnvLoader) Int() int
- func (e *EnvLoader) Int16() int16
- func (e *EnvLoader) Int32() int32
- func (e *EnvLoader) Int64() int64
- func (e *EnvLoader) Int8() int8
- func (e *EnvLoader) Interface() interface{}
- func (e *EnvLoader) MustBool(def bool) bool
- func (e *EnvLoader) MustFloat32(def float32) float32
- func (e *EnvLoader) MustFloat64(def float64) float64
- func (e *EnvLoader) MustInt(def int) int
- func (e *EnvLoader) MustInt16(def int16) int16
- func (e *EnvLoader) MustInt32(def int32) int32
- func (e *EnvLoader) MustInt64(def int64) int64
- func (e *EnvLoader) MustInt8(def int8) int8
- func (e *EnvLoader) Raw() string
- func (e *EnvLoader) Time() time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EnvLoader ¶ added in v1.0.4
type EnvLoader struct { KeepRawValue bool // 断言失败时返回原始值 为false时raw永远为原始值的空值 // contains filtered or unexported fields }
func (*EnvLoader) MustFloat32 ¶ added in v1.0.7
func (*EnvLoader) MustFloat64 ¶ added in v1.0.7
Click to show internal directories.
Click to hide internal directories.