Commit 0dd7b8f8 authored by feilengcui008's avatar feilengcui008 Committed by Brad Fitzpatrick

runtime: clean redundant call of environ function

Change-Id: Ica7179d225c1fb79381f82f58ea5050ac6418b9c
Reviewed-on: https://go-review.googlesource.com/42493Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent f504bc00
......@@ -13,7 +13,7 @@ func gogetenv(key string) string {
if env == nil {
throw("getenv before env init")
}
for _, s := range environ() {
for _, s := range env {
if len(s) > len(key) && s[len(key)] == '=' && s[:len(key)] == key {
return s[len(key)+1:]
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment