Documentation ¶
Index ¶
- func Expand(value string) string
- func Get(names ...string) string
- func GetBoolVal(val *bool, names ...string)
- func GetFloatVal(val *float64, names ...string)
- func GetIntVal(val *int, names ...string)
- func GetWith(val *string, names ...string)
- func Key(key string) string
- func List() map[string]string
- func Lookup(key string) (string, bool)
- func MustGet(names ...string) string
- func Set(key, value string) error
- func UnSetenv(key string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Expand ¶
Expand 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 accepts value formats "${env}" ,"${env||defaultValue}" , "defaultValue". Examples:
_ = Expand("${GOPATH}") _ = Expand("${GOPATH||/usr/local/go}") _ = Expand("hello")
func GetBoolVal ¶
func GetFloatVal ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.