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: Expose isTrue function #12033

Closed
md5 opened this issue Aug 5, 2015 · 1 comment
Closed

text/template: Expose isTrue function #12033

md5 opened this issue Aug 5, 2015 · 1 comment
Assignees
Milestone

Comments

@md5
Copy link

@md5 md5 commented Aug 5, 2015

It would be great if the isTrue function in text.template were exposed (cf. https://golang.org/src/text/template/exec.go#L212). This would allow custom template functions to easily use the same semantics for truthiness that text.template itself uses for if.

@ianlancetaylor ianlancetaylor changed the title Expose isTrue function in text.template test/template: Expose isTrue function Aug 5, 2015
@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Aug 5, 2015
@ianlancetaylor ianlancetaylor changed the title test/template: Expose isTrue function text/template: Expose isTrue function Aug 5, 2015
@robpike robpike self-assigned this Aug 6, 2015
@robpike robpike modified the milestones: Go1.6Early, Unplanned Aug 26, 2015
@gopherbot
Copy link

@gopherbot gopherbot commented Sep 15, 2015

CL https://golang.org/cl/14593 mentions this issue.

@robpike robpike closed this in a326c3e Sep 17, 2015
@golang golang locked and limited conversation to collaborators Sep 22, 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
4 participants
You can’t perform that action at this time.