text/template: improve error message "incompatible types for comparison" #71421
Labels
LibraryProposal
Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version go1.23.5 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Actually, this problem came via using
helm
to template a Helm chart, but this is the essence of the problem in pure Go:What did you see happen?
What did you expect to see?
It would be helpful to add in the error message which types are causing the incompatibility. When using
text/template
in Helm, there are many layers in between, so the error messageincompatible types for comparison
might not be easy to debug.The text was updated successfully, but these errors were encountered: