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

Function parseStorageOpts

cli/command/container/opts.go:982–992  ·  view source on GitHub ↗

parses storage options per container into a map

(storageOpts []string)

Source from the content-addressed store, hash-verified

980
981// parses storage options per container into a map
982func parseStorageOpts(storageOpts []string) (map[string]string, error) {
983 m := make(map[string]string)
984 for _, option := range storageOpts {
985 k, v, ok := strings.Cut(option, "=")
986 if !ok {
987 return nil, errors.New("invalid storage option")
988 }
989 m[k] = v
990 }
991 return m, nil
992}
993
994// parseDevice parses a device mapping string to a container.DeviceMapping struct
995func parseDevice(device, serverOS string) (container.DeviceMapping, error) {

Callers 1

parseFunction · 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…