github.com/reds/docker@v1.11.2-rc1/libcontainerd/utils_windows.go (about) 1 package libcontainerd 2 3 import "strings" 4 5 // setupEnvironmentVariables convert 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.Split(s, "=") 11 if len(arr) == 2 { 12 r[arr[0]] = arr[1] 13 } 14 } 15 return r 16 }