Documentation ¶ Index ¶ func GetBool(key string) bool func GetDuration(key string) time.Duration func GetInt(key string) int func GetInt64(key string) int64 func GetString(key string) string func Init(fileName string) type Settings func GetSettings() *Settings Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GetBool ¶ func GetBool(key string) bool 快捷获取 bool func GetDuration ¶ func GetDuration(key string) time.Duration 快捷获取时间长度 func GetInt ¶ func GetInt(key string) int 快捷获取整形 func GetInt64 ¶ func GetInt64(key string) int64 快捷获取64位整形 func GetString ¶ func GetString(key string) string 快捷获取字符串 func Init ¶ func Init(fileName string) Types ¶ type Settings ¶ type Settings struct { *viper.Viper } func GetSettings ¶ func GetSettings() *Settings 获取 Settings Source Files ¶ View all Source files setting.go Click to show internal directories. Click to hide internal directories.