Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
text/template: (also html/template?) range on channel gotcha #7986
This relate's in part to issue #7445. Currently Execute is documented as: Execute applies a parsed template to the specified data object, and writes the output to wr. I believe it should say that if a write error is encountered, the remainder of the template will not be executed. I discovered this behaviour when serving templates over http, ranging over a channel, which was populated by a goroutine. If the network connection prematurely closed, the goroutine would lock up/memory leak. This might also be worth a mention with the range command when dealing with channels.