summaryrefslogtreecommitdiff
path: root/pkg/env/env_unix.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-01-20 09:33:30 -0500
committerGitHub <noreply@github.com>2022-01-20 09:33:30 -0500
commit206e57e5b012ae03315dfb84735d034dd9cfd26e (patch)
tree22652f96d82ed6fe106f6b8d71a92e6ea28e34c3 /pkg/env/env_unix.go
parent1d6e154a73505cd0366cdeec7cc8582dd3ac2191 (diff)
parent4693fc6db14e00db7f1af0b02fad15da35fb3799 (diff)
downloadpodman-206e57e5b012ae03315dfb84735d034dd9cfd26e.tar.gz
podman-206e57e5b012ae03315dfb84735d034dd9cfd26e.tar.bz2
podman-206e57e5b012ae03315dfb84735d034dd9cfd26e.zip
Merge pull request #12928 from n1hility/win-env
Implement env parsing on Windows
Diffstat (limited to 'pkg/env/env_unix.go')
-rw-r--r--pkg/env/env_unix.go15
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
+}