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: add support for variable overwrite (= not :=) #10608
Given this template snippet:
This is probably as designed, but it would be really nice if there was a way to get the changed
Had a quick look. As @bep said, this seems to be by design - templates have no
This issue isn't a proposal, and it was set to Unplanned which means "might be fixed at some point", so I'll assume that there is no reason to not add the feature. It also seems logical to have it, as the template package does speak of "variables" and the
I'll try to have a CL for 1.11 - reviewers welcome once it's up.
In the CL I posted, Rob pointed out how this idea was never formally a proposal, so it was never reviewed nor accepted. In my earlier comment I explained why I assumed that this issue could be worked on, but I think I was a bit too optimistic in my thinking that it had already been reviewed.
For the time being, I've repurposed the issue as a proposal, and hopefully the proposal review team will get to it soon.
This reverts commit 26a3f96. The feature to overwrite a variable within a conditional using `=` is new in Go 1.11. The Go version on bionic is 1.10, so this fails at runtime: template: mirrorlist.html:27: unexpected "=" in operand Since we have enabled mirrors, then I don't think we'll run into the issue this was fixing anyways. The revert needs a little adjustment since the label was changed from the ID attribute to the Name attribute since this commit. 1. golang/go#10608 https://phabricator.endlessm.com/T25314
…gMap. (#18115) Signed-off-by: Cédric de Saint Martin <email@example.com>