{"id":"f2b87023c33ae001","repo":"docker/cli","slug":"template-parsing-error-w-f2b870","errorCode":null,"errorMessage":"template parsing error: %w","messagePattern":"template parsing error: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/system/version.go","lineNumber":249,"sourceCode":"\nfunc prettyPrintVersion(out io.Writer, vd versionInfo, tmpl *template.Template) error {\n\tt := tabwriter.NewWriter(out, 20, 1, 1, ' ', 0)\n\terr := tmpl.Execute(t, vd)\n\t_, _ = t.Write([]byte(\"\\n\"))\n\t_ = t.Flush()\n\treturn err\n}\n\nfunc newVersionTemplate(templateFormat string) (*template.Template, error) {\n\tswitch templateFormat {\n\tcase \"\":\n\t\ttemplateFormat = defaultVersionTemplate\n\tcase formatter.JSONFormatKey:\n\t\ttemplateFormat = formatter.JSONFormat\n\t}\n\ttmpl, err := templates.New(\"version\").Funcs(template.FuncMap{\"getDetailsOrder\": getDetailsOrder}).Parse(templateFormat)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"template parsing error: %w\", err)\n\t}\n\treturn tmpl, nil\n}\n\nfunc getDetailsOrder(v system.ComponentVersion) []string {\n\tout := make([]string, 0, len(v.Details))\n\tfor k := range v.Details {\n\t\tout = append(out, k)\n\t}\n\tsort.Strings(out)\n\treturn out\n}\n","sourceCodeStart":231,"sourceCodeEnd":262,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/system/version.go#L231-L262","documentation":"Error \"template parsing error: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/system/version.go:249 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}