html/template: {{range}} branches end in different contexts #54999
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)? 1.19.1Does this issue reproduce with the latest release? Yes
What operating system and processor architecture are you using (
go env
)?GO playground & UBUNTU
go env
OutputWhat did you do?
I wrote a RANGE statement in Javascript part of HTML template and received a CONTEXT error.
I fixed this by manually inserting the first line that would be generated by the RANGE statement before running the RANGE statement
More details at https://stackoverflow.com/questions/73675601/go-1-19-error-executing-template-range-branches-end-in-different-contexts
GO Playground Link https://go.dev/play/p/RELjQ71DT0O. Just comment out or delete the line before the RANGE statement to see the problem
What did you expect to see?
No CONTEXT error
What did you see instead?
A CONTEXT error
The text was updated successfully, but these errors were encountered: