...SplitN, not SplitAfterN

This commit is contained in:
2021-12-18 04:46:43 -05:00
parent cf67bec392
commit 008ed531a2
2 changed files with 3 additions and 3 deletions

View File

@@ -16,8 +16,8 @@ func envListToMap(envs []string) (envMap map[string]string) {
envMap = make(map[string]string, 0)
for _, ev := range envs {
kv = strings.SplitAfterN(ev, "=", 2)
// I *think* SplitAfterN does this for me, but...
kv = strings.SplitN(ev, "=", 2)
// I *think* SplitN does this for me, but...
if len(kv) == 1 {
kv = append(kv, "")
}