diff options
Diffstat (limited to 'pkg/env/env_unix.go')
-rw-r--r-- | pkg/env/env_unix.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/env/env_unix.go b/pkg/env/env_unix.go new file mode 100644 index 000000000..16061a700 --- /dev/null +++ b/pkg/env/env_unix.go @@ -0,0 +1,15 @@ +// +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 +} |