{"id":"35a88f7ff06e03a5","repo":"docker/cli","slug":"bad-format-of-filter-expected-name-value","errorCode":null,"errorMessage":"bad format of filter (expected name=value)","messagePattern":"bad format of filter \\(expected name=value\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"opts/opts.go","lineNumber":309,"sourceCode":"\nfunc (o *FilterOpt) String() string {\n\tif o == nil || len(o.filter) == 0 {\n\t\treturn \"\"\n\t}\n\trepr, err := json.Marshal(o.filter)\n\tif err != nil {\n\t\treturn \"invalid filters\"\n\t}\n\treturn string(repr)\n}\n\n// Set sets the value of the opt by parsing the command line value\nfunc (o *FilterOpt) Set(value string) error {\n\tif value == \"\" {\n\t\treturn nil\n\t}\n\tif !strings.Contains(value, \"=\") {\n\t\treturn errors.New(\"bad format of filter (expected name=value)\")\n\t}\n\tname, val, _ := strings.Cut(value, \"=\")\n\n\t// TODO(thaJeztah): these options should not be case-insensitive.\n\tname = strings.ToLower(strings.TrimSpace(name))\n\tval = strings.TrimSpace(val)\n\to.filter.Add(name, val)\n\treturn nil\n}\n\n// Type returns the option type\nfunc (*FilterOpt) Type() string {\n\treturn \"filter\"\n}\n\n// Value returns the value of this option\nfunc (o *FilterOpt) Value() client.Filters {\n\treturn o.filter","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/opts/opts.go#L291-L327","documentation":"Error \"bad format of filter (expected name=value)\" thrown in docker/cli.","triggerScenarios":"Thrown at opts/opts.go:309 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}