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 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
- 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
Types ¶
Click to show internal directories.
Click to hide internal directories.