{"id":"6cb8257839119508","repo":"docker/cli","slug":"invalid-option-s-in-s-option-should-not-hav","errorCode":null,"errorMessage":"invalid option '%s' in '%s': option should not have whitespace","messagePattern":"invalid option '(.+?)' in '(.+?)': option should not have whitespace","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"opts/mount.go","lineNumber":43,"sourceCode":"\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 {\n\t\t\tv := strings.TrimSpace(val)\n\t\t\tif v == \"\" {\n\t\t\t\treturn fmt.Errorf(\"invalid value for '%s': value is empty\", key)\n\t\t\t}\n\t\t\tif v != val {\n\t\t\t\treturn fmt.Errorf(\"invalid value for '%s' in '%s': value should not have whitespace\", key, field)\n\t\t\t}\n\t\t}\n\n\t\t// TODO(thaJeztah): these options should not be case-insensitive.\n\t\tkey = strings.ToLower(key)\n\n\t\tif !hasValue {\n\t\t\tswitch key {\n\t\t\tcase \"readonly\", \"ro\", \"volume-nocopy\", \"bind-nonrecursive\", \"bind-create-src\":\n\t\t\t\t// boolean values","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/opts/mount.go#L25-L61","documentation":"Error \"invalid option '%s' in '%s': option should not have whitespace\" thrown in docker/cli.","triggerScenarios":"Thrown at opts/mount.go:43 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}