From 5a47e7aaae983719afffcbff9738d9a6e46d9873 Mon Sep 17 00:00:00 2001 From: fatedier Date: Mon, 4 Apr 2022 23:12:25 +0800 Subject: [PATCH] fix error parsing env values --- pkg/config/value.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/config/value.go b/pkg/config/value.go index 41c6c65a..e44fbd69 100644 --- a/pkg/config/value.go +++ b/pkg/config/value.go @@ -29,11 +29,11 @@ func init() { glbEnvs = make(map[string]string) envs := os.Environ() for _, env := range envs { - kv := strings.Split(env, "=") - if len(kv) != 2 { + pair := strings.SplitN(env, "=", 2) + if len(pair) != 2 { continue } - glbEnvs[kv[0]] = kv[1] + glbEnvs[pair[0]] = pair[1] } }