text/template: panic: indirection through nil pointer to embedded struct #48215
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
This is similar to #30143 and #28242.
While working with a template, I was getting panics that were hard to debug because there is no contextual information available to pinpoint where is the problem in the template/data.
I was able to reduce template to reproduce the panic:
https://play.golang.org/p/0l9Ud0i7ZzH
What did you expect to see?
I expected an error with contextual information, similar to when the nil pointer is not an embedded field:
Test Function
What did you see instead?
The text was updated successfully, but these errors were encountered: