(driverOpt string)
| 146 | } |
| 147 | |
| 148 | func parseDriverOpt(driverOpt string) (string, string, error) { |
| 149 | // TODO(thaJeztah): these options should not be case-insensitive. |
| 150 | // TODO(thaJeztah): should value be converted to lowercase as well, or only the key? |
| 151 | key, value, ok := strings.Cut(strings.ToLower(driverOpt), "=") |
| 152 | if !ok || key == "" { |
| 153 | return "", "", errors.New("invalid key value pair format in driver options") |
| 154 | } |
| 155 | key = strings.TrimSpace(key) |
| 156 | value = strings.TrimSpace(value) |
| 157 | return key, value, nil |
| 158 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…