text/template: documentation for IsTrue disagrees with its implementation for struct types #28394
Labels
Documentation
Issues describing a change to documentation.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
As noted in #28391, the documentation for
template.IsTrue
says:The zero
time.Time
is the zero of its type, so according to the documentation it should be considered to be true, but the implementation clearly intends otherwise:go/src/text/template/exec.go
Lines 326 to 327 in f6b554f
Either the documentation should be clarified, or the behavior of
IsTrue
should be fixed to match what is documented. Probably the former.The text was updated successfully, but these errors were encountered: