Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvOrDefault ¶
GetEnvOrDefault 获取环境变量值。 成功获取到,则返回具体值;若无法获取或获取到空,则返回 defaultValue。
Types ¶
type RuntimeEnv ¶
type RuntimeEnv string
const ( Production RuntimeEnv = "production" Development RuntimeEnv = "development" Test RuntimeEnv = "test" Unset RuntimeEnv = "" )
运行环境定义
func GetRuntimeEnv ¶
func GetRuntimeEnv() RuntimeEnv
GetRuntimeEnv 获取当前环境 默认为生产(production),指定环境为开发(development),测试(test)
Click to show internal directories.
Click to hide internal directories.