MCPcopy Index your code
hub / github.com/docker/cli / parseDriverOpt

Function parseDriverOpt

opts/network.go:148–158  ·  view source on GitHub ↗
(driverOpt string)

Source from the content-addressed store, hash-verified

146}
147
148func 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}

Callers 1

SetMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…