mirror of
https://github.com/containers/podman
synced 2024-10-20 01:03:51 +00:00
ea08765f40
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
17 lines
348 B
Go
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
|
|
}
|