utils_windows.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package libcontainerd
  2. import "strings"
  3. // setupEnvironmentVariables converts a string array of environment variables
  4. // into a map as required by the HCS. Source array is in format [v1=k1] [v2=k2] etc.
  5. func setupEnvironmentVariables(a []string) map[string]string {
  6. r := make(map[string]string)
  7. for _, s := range a {
  8. arr := strings.SplitN(s, "=", 2)
  9. if len(arr) == 2 {
  10. r[arr[0]] = arr[1]
  11. }
  12. }
  13. return r
  14. }
  15. // Apply for a servicing option is a no-op.
  16. func (s *ServicingOption) Apply(interface{}) error {
  17. return nil
  18. }
  19. // Apply for the flush option is a no-op.
  20. func (f *FlushOption) Apply(interface{}) error {
  21. return nil
  22. }
  23. // Apply for the hypervisolation option is a no-op.
  24. func (h *HyperVIsolationOption) Apply(interface{}) error {
  25. return nil
  26. }
  27. // Apply for the layer option is a no-op.
  28. func (h *LayerOption) Apply(interface{}) error {
  29. return nil
  30. }
  31. // Apply for the network endpoints option is a no-op.
  32. func (s *NetworkEndpointsOption) Apply(interface{}) error {
  33. return nil
  34. }
  35. // Apply for the credentials option is a no-op.
  36. func (s *CredentialsOption) Apply(interface{}) error {
  37. return nil
  38. }