{"id":"f517390abe57bf0d","repo":"docker/cli","slug":"invalid-bind-address-format-s","errorCode":null,"errorMessage":"invalid bind address format: %s","messagePattern":"invalid bind address format: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"opts/hosts.go","lineNumber":75,"sourceCode":"\tproto, host, hasProto := strings.Cut(addr, \"://\")\n\tif !hasProto && proto != \"\" {\n\t\thost = proto\n\t\tproto = \"tcp\"\n\t}\n\n\tswitch proto {\n\tcase \"tcp\":\n\t\treturn ParseTCPAddr(host, defaultTCPHost)\n\tcase \"unix\":\n\t\treturn parseSimpleProtoAddr(proto, host, defaultUnixSocket)\n\tcase \"npipe\":\n\t\treturn parseSimpleProtoAddr(proto, host, defaultNamedPipe)\n\tcase \"fd\":\n\t\treturn addr, nil\n\tcase \"ssh\":\n\t\treturn addr, nil\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"invalid bind address format: %s\", addr)\n\t}\n}\n\n// parseSimpleProtoAddr parses and validates that the specified address is a valid\n// socket address for simple protocols like unix and npipe. It returns a formatted\n// socket address, either using the address parsed from addr, or the contents of\n// defaultAddr if addr is a blank string.\nfunc parseSimpleProtoAddr(proto, addr, defaultAddr string) (string, error) {\n\taddr = strings.TrimPrefix(addr, proto+\"://\")\n\tif strings.Contains(addr, \"://\") {\n\t\treturn \"\", fmt.Errorf(\"invalid proto, expected %s: %s\", proto, addr)\n\t}\n\tif addr == \"\" {\n\t\taddr = defaultAddr\n\t}\n\treturn fmt.Sprintf(\"%s://%s\", proto, addr), nil\n}\n","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/opts/hosts.go#L57-L93","documentation":"Error \"invalid bind address format: %s\" thrown in docker/cli.","triggerScenarios":"Thrown at opts/hosts.go:75 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}