Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrDefaultBool ¶
以布尔形式读取指定环境变量的值。
入参:
- envVar:环境变量。
- defaultValue: 默认值。
出参:
- 环境变量值。如果指定环境变量不存在、或者值的类型不是布尔,则返回默认值。
func GetOrDefaultInt ¶
以整数形式读取指定环境变量的值。
入参:
- envVar:环境变量。
- defaultValue: 默认值。
出参:
- 环境变量值。如果指定环境变量不存在、或者值的类型不是整数,则返回默认值。
func GetOrDefaultString ¶
以字符串形式读取指定环境变量的值。
入参:
- envVar:环境变量。
- defaultValue: 默认值。
出参:
- 环境变量值。如果指定环境变量不存在、或者值为零值,则返回默认值。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.