Skip to content

Commit c3350f4

Browse files
authored
Update definition of falsy to include zero time.Time values
1 parent b0e5ab0 commit c3350f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎content/en/functions/go-template/_common/truthy-falsy.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
# Do not remove front matter.
33
---
44

5-
In Go templates, the falsy values are `false`, `0`, any nil pointer or interface value, and any array, slice, map, or string of length zero. Everything else is truthy.
5+
The falsy values are `false`, `0`, any `nil` pointer or interface value, any array, slice, map, or string of length zero, and zero `time.Time` values.
6+
7+
Everything else is truthy.

0 commit comments

Comments
 (0)