polarisxu icon indicating copy to clipboard operation
polarisxu copied to clipboard

posts/go/pkg/go-std-env/

Open utterances-bot opened this issue 4 years ago • 2 comments

Go 如何获取和设置环境变量

https://polarisxu.studygolang.com/posts/go/pkg/go-std-env/

utterances-bot avatar Oct 31 '21 09:10 utterances-bot

func Getenv(key string) string // LookupEnv 检索 key 这个键对应的环境变量的值。 // 如果该环境变量不存在,则返回对应的值(可能为空),并且布尔值为 true。 // 否则,返回值将为空,布尔值将为 false。

此处是笔误? 如果该环境变量存在,则返回值,true

SakaZhang avatar Oct 31 '21 09:10 SakaZhang

@SakaZhang 已修复,谢谢

polaris1119 avatar Oct 31 '21 09:10 polaris1119