Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorVarNotExist = NewEnvErr("variable not exist")
Functions ¶
This section is empty.
Types ¶
type ConfigServer ¶ added in v1.1.1
func NewDefaultConfigServer ¶ added in v1.1.1
func NewDefaultConfigServer(envPath string, fallbackToWide ...bool) (ConfigServer, error)
type Env ¶
type Env interface { GetInt(k string, def ...int) (int, error) MustGetInt(k string, def ...int) int GetString(k string, def ...string) (string, error) MustGetString(k string, def ...string) string GetBool(k string, def ...bool) (bool, error) MustGetBool(k string, def ...bool) bool GetStringArr(k string, def ...[]string) ([]string, error) MustGetStringArr(k string, def ...[]string) []string GetIntArr(k string, def ...[]int) ([]int, error) MustGetIntArr(k string, def ...[]int) []int Dump() (string, error) }
func LoadWithConfigServer ¶ added in v1.1.1
func LoadWithConfigServer(configServer ConfigServer) (Env, error)
Click to show internal directories.
Click to hide internal directories.