github.com/hms58/moby@v1.13.1/libcontainerd/utils_windows.go (about)

     1  package libcontainerd
     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  }
    17  
    18  // Apply for a servicing option is a no-op.
    19  func (s *ServicingOption) Apply(interface{}) error {
    20  	return nil
    21  }
    22  
    23  // Apply for the flush option is a no-op.
    24  func (f *FlushOption) Apply(interface{}) error {
    25  	return nil
    26  }
    27  
    28  // Apply for the hypervisolation option is a no-op.
    29  func (h *HyperVIsolationOption) Apply(interface{}) error {
    30  	return nil
    31  }
    32  
    33  // Apply for the layer option is a no-op.
    34  func (h *LayerOption) Apply(interface{}) error {
    35  	return nil
    36  }
    37  
    38  // Apply for the network endpoints option is a no-op.
    39  func (s *NetworkEndpointsOption) Apply(interface{}) error {
    40  	return nil
    41  }
    42  
    43  // Apply for the credentials option is a no-op.
    44  func (s *CredentialsOption) Apply(interface{}) error {
    45  	return nil
    46  }