Update definition of falsy to include zero time.Time values

This commit is contained in:
Joe Mooring 2024-08-25 08:32:29 -07:00 committed by GitHub
parent b0e5ab0514
commit c3350f4cfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,4 +2,6 @@
# Do not remove front matter.
---
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.
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.
Everything else is truthy.