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

Comments

@md5
Copy link

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

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

@golang golang locked and limited conversation to collaborators Sep 22, 2016
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants