Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text/template: Reconsider new IsTrue API #12801

Closed
dsymonds opened this issue Sep 30, 2015 · 1 comment
Closed

text/template: Reconsider new IsTrue API #12801

dsymonds opened this issue Sep 30, 2015 · 1 comment
Assignees
Milestone

Comments

@dsymonds
Copy link
Member

@dsymonds dsymonds commented Sep 30, 2015

In https://go-review.googlesource.com/#/c/14593/, to address #12033, @robpike added a new function, func IsTrue(val reflect.Value) (truth, ok bool) to text/template. That's the first use of reflect in this package's API, thus pulling in ~16 KB of new package export data.

An alternative is to change this new function to be func IsTrue(val interface{}) (truth, ok bool), and do the reflection inside the text/template package.

After a brief discussion with @adg, he asked me to file an issue to track this.

@dsymonds dsymonds added this to the Go1.6 milestone Sep 30, 2015
@adg
Copy link
Contributor

@adg adg commented Sep 30, 2015

@dsymonds dsymonds self-assigned this Oct 1, 2015
@dsymonds dsymonds closed this in 090843b Oct 1, 2015
@golang golang locked and limited conversation to collaborators Oct 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.