github.com/adityamillind98/moby@v23.0.0-rc.4+incompatible/libcontainerd/local/utils_windows.go (about) 1 package local // import "github.com/docker/docker/libcontainerd/local" 2 3 import "strings" 4 5 // setupEnvironmentVariables converts a string array of environment variables 6 // into a map as required by the HCS. Source array is in format [v1=k1] [v2=k2] etc. 7 func setupEnvironmentVariables(a []string) map[string]string { 8 r := make(map[string]string) 9 for _, s := range a { 10 arr := strings.SplitN(s, "=", 2) 11 if len(arr) == 2 { 12 r[arr[0]] = arr[1] 13 } 14 } 15 return r 16 }