Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Prefix string
环境变量的前缀
Functions ¶
func Expand ¶
ExpandEnv returns value of convert with environment variable. Return environment variable if value start with "${" and end with "}". Return default value if environment variable is empty or not exist.
It accept value formats "${env}" , "${env||}}" , "${env||defaultValue}" , "defaultvalue". Examples:
v1 := config.ExpandValueEnv("${GOPATH}") // return the GOPATH environment variable. v2 := config.ExpandValueEnv("${GOAsta||/usr/local/go}") // return the default value "/usr/local/go/". v3 := config.ExpandValueEnv("Astaxie") // return the value "Astaxie".
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.