(options []string)
| 86 | } |
| 87 | |
| 88 | func convertDriverOpt(options []string) (map[string]string, error) { |
| 89 | driverOpt := make(map[string]string) |
| 90 | for _, opt := range options { |
| 91 | k, v, ok := strings.Cut(opt, "=") |
| 92 | // TODO(thaJeztah): we should probably not accept whitespace here (both for key and value). |
| 93 | k = strings.TrimSpace(k) |
| 94 | if !ok || k == "" { |
| 95 | return nil, errors.New("invalid key/value pair format in driver options") |
| 96 | } |
| 97 | driverOpt[k] = strings.TrimSpace(v) |
| 98 | } |
| 99 | return driverOpt, nil |
| 100 | } |
| 101 | |
| 102 | func toNetipAddrSlice(ips []net.IP) []netip.Addr { |
| 103 | if len(ips) == 0 { |
no outgoing calls
no test coverage detected
searching dependent graphs…