{"id":"839d0a80c911a69b","repo":"docker/cli","slug":"expected-slice-got-t","errorCode":null,"errorMessage":"expected slice, got %T","messagePattern":"expected slice, got %T","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"templates/templates.go","lineNumber":137,"sourceCode":"\t\tfor i := range rv.Len() {\n\t\t\tif i > 0 {\n\t\t\t\tb.WriteString(sep)\n\t\t\t}\n\t\t\t_, _ = fmt.Fprint(&b, rv.Index(i).Interface())\n\t\t}\n\t\treturn b.String(), nil\n\n\tcase reflect.Map:\n\t\tvar out []string\n\t\tfor _, k := range rv.MapKeys() {\n\t\t\tout = append(out, fmt.Sprint(rv.MapIndex(k).Interface()))\n\t\t}\n\t\t// Not ideal, but trying to keep a consistent order\n\t\tsort.Strings(out)\n\t\treturn strings.Join(out, sep), nil\n\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"expected slice, got %T\", elems)\n\t}\n}\n","sourceCodeStart":119,"sourceCodeEnd":140,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/templates/templates.go#L119-L140","documentation":"Error \"expected slice, got %T\" thrown in docker/cli.","triggerScenarios":"Thrown at templates/templates.go:137 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}