]> Cypherpunks repositories - gostls13.git/commit
text/template: export isTrue
authorRob Pike <r@golang.org>
Tue, 15 Sep 2015 16:27:22 +0000 (09:27 -0700)
committerRob Pike <r@golang.org>
Thu, 17 Sep 2015 23:08:33 +0000 (23:08 +0000)
commita326c3e1ad3713c3e1c3373a45c6907e10fb1579
tree2ccaf926d80fe816714c8fb4a68fbe560bae70d6
parent1216e181352c76d93d0ac501d22a5b7175c4cbf2
text/template: export isTrue

The definition of 'truth' used by if etc. is not trivial to compute, so publish
the implementation to allow custom template functions to have the
same definition as the template language itself.

Fixes #12033.

Change-Id: Icdfd6039722d7d3f984ba0905105eb3253e14831
Reviewed-on: https://go-review.googlesource.com/14593
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/html/template/template.go
src/text/template/exec.go
src/text/template/funcs.go