mirror of
https://github.com/containers/podman.git
synced 2025-08-01 04:42:20 +08:00

This reverts commit 170a78631b4b0a0e5963e860cc3c3b297b4a7d09. This was a breaking change and users are hitting it, see https://github.com/containers/podman/issues/19565 Fixes #19565 Signed-off-by: Paul Holzinger <pholzing@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
|
|
}
|