mirror of
https://github.com/containers/podman
synced 2024-10-22 02:03:38 +00:00
70e6b2e6dd
environment variables are handled differently on windows vs linux. here we split them to be handled but no actually processing of windows environment variables was done. it can be added for future. hoowever, now we dont get errors on windows about processing them. Signed-off-by: Brent Baude <bbaude@redhat.com>
16 lines
332 B
Go
16 lines
332 B
Go
// +build linux darwin
|
|
|
|
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
|
|
}
|