From c3350f4cfd7b853b577cd6b6aa8b947caa63f26f Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sun, 25 Aug 2024 08:32:29 -0700 Subject: [PATCH] Update definition of falsy to include zero time.Time values --- content/en/functions/go-template/_common/truthy-falsy.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/en/functions/go-template/_common/truthy-falsy.md b/content/en/functions/go-template/_common/truthy-falsy.md index c8fc9e09e..c41bb6561 100644 --- a/content/en/functions/go-template/_common/truthy-falsy.md +++ b/content/en/functions/go-template/_common/truthy-falsy.md @@ -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.