podman/pkg/env/env_unix.go
Valentin Rothberg ea08765f40 go fmt: use go 1.18 conditional-build syntax
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-18 09:11:53 +01:00

17 lines
348 B
Go

//go:build !windows
// +build !windows
package env
// ParseSlice parses the specified slice and transforms it into an environment
// map.
func ParseSlice(s []string) (map[string]string, error) {
env := make(map[string]string, len(s))
for _, e := range s {
if err := parseEnv(env, e); err != nil {
return nil, err
}
}
return env, nil
}