Documentation
¶
Index ¶
- Variables
- func Add(name string, configuration map[string]interface{})
- func Env(envName string, defaultValue ...interface{}) interface{}
- func Get(path string, defaultValue ...interface{}) interface{}
- func GetBool(path string, defaultValue ...interface{}) bool
- func GetFloat64(path string, defaultValue ...interface{}) float64
- func GetInt(path string, defaultValue ...interface{}) int
- func GetInt64(path string, defaultValue ...interface{}) int64
- func GetString(path string, defaultValue ...interface{}) string
- func GetUint(path string, defaultValue ...interface{}) uint
- func IsLocal() bool
- func IsProduction() bool
- func IsTesting() bool
- type StrMap
Constants ¶
This section is empty.
Variables ¶
View Source
var Viper *viper.Viper
Viper Viper 库实例
Functions ¶
func Get ¶
func Get(path string, defaultValue ...interface{}) interface{}
Get 获取配置项,允许使用点式获取,如:app.name
func GetFloat64 ¶
func IsProduction ¶
func IsProduction() bool
Types ¶
Click to show internal directories.
Click to hide internal directories.