{"id":"ed273418a2dd8a26","repo":"docker/cli","slug":"value-is-empty","errorCode":null,"errorMessage":"value is empty","messagePattern":"value is empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"opts/mount.go","lineNumber":27,"sourceCode":"\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/docker/go-units\"\n\tmounttypes \"github.com/moby/moby/api/types/mount\"\n)\n\n// MountOpt is a Value type for parsing mounts\ntype MountOpt struct {\n\tvalues []mounttypes.Mount\n}\n\n// Set a new mount value\n//\n//nolint:gocyclo\nfunc (m *MountOpt) Set(value string) error {\n\tvalue = strings.TrimSpace(value)\n\tif value == \"\" {\n\t\treturn errors.New(\"value is empty\")\n\t}\n\n\tcsvReader := csv.NewReader(strings.NewReader(value))\n\tfields, err := csvReader.Read()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tmount := mounttypes.Mount{\n\t\tType: mounttypes.TypeVolume, // default to volume mounts\n\t}\n\n\tfor _, field := range fields {\n\t\tkey, val, hasValue := strings.Cut(field, \"=\")\n\t\tif k := strings.TrimSpace(key); k != key {\n\t\t\treturn fmt.Errorf(\"invalid option '%s' in '%s': option should not have whitespace\", k, field)\n\t\t}\n\t\tif hasValue {","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/opts/mount.go#L9-L45","documentation":"Error \"value is empty\" thrown in docker/cli.","triggerScenarios":"Thrown at opts/mount.go:27 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}