Documentation ¶
Index ¶
- Constants
- func Confer() *viper.Viper
- func GetBool(s string) bool
- func GetDuration(s string) time.Duration
- func GetDurationD(s string, d time.Duration) time.Duration
- func GetEnv() string
- func GetInt(s string) int
- func GetIntD(s string, d int) int
- func GetString(s string) string
- func GetStringD(s string, d string) string
- func GetStringMapString(s string) map[string]string
- func GetStringSlice(s string) []string
- func IsDebug() bool
- func IsEnv() bool
- func IsProd() bool
- func Setup(path string, common ...string)
- func UnmarshalKey(s string, rawVal interface{}) error
Constants ¶
View Source
const ( // 环境 EnvDebug = "debug" // 开启了debug EnvDev = "dev" // 开发环境 EnvTest = "sit" // 测试环境 EnvProd = "prod" // 生产环境 )
Variables ¶
This section is empty.
Functions ¶
func GetDuration ¶
func GetDurationD ¶
GetDurationD GetDuration with a default value
func GetStringD ¶
GetStringD GetString with a default value
func GetStringMapString ¶
func GetStringSlice ¶
func UnmarshalKey ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.