caddy-log-exporter/vendor/github.com/caarlos0/env/v11/env_tomap.go
2024-09-19 11:21:05 +02:00

17 lines
237 B
Go

//go:build !windows
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]
}
}
return r
}