auth/vendor/github.com/caarlos0/env/v9/env_tomap.go

17 lines
237 B
Go
Raw Permalink Normal View History

//go:build !windows
2023-01-16 09:25:08 +00:00
package env
import "strings"
func toMap(env []string) map[string]string {
r := map[string]string{}
for _, e := range env {
p := strings.SplitN(e, "=", 2)
if len(p) == 2 {
r[p[0]] = p[1]
}
2023-01-16 09:25:08 +00:00
}
return r
}