From d7599307c9843078c0ab622ed1d4f5142c620e7e Mon Sep 17 00:00:00 2001 From: Cameron Moore Date: Wed, 16 Mar 2016 12:45:50 -0500 Subject: [PATCH] tpl: Treat booleans as set in default function Booleans and `default` don't really make sense together, so we'll always treat booleans as "set" and return the given value. --- content/templates/functions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/templates/functions.md b/content/templates/functions.md index b749e774c..984efc9b1 100644 --- a/content/templates/functions.md +++ b/content/templates/functions.md @@ -30,9 +30,9 @@ and other basic tools; these are listed in the ### default Checks whether a given value is set and returns a default value if it is not. -"Set" in this context means true for booleans; non-zero for numeric types and -times; non-zero length for strings, arrays, slices, and maps; any struct value; -or non-nil for any other types. +"Set" in this context means non-zero for numeric types and times; +non-zero length for strings, arrays, slices, and maps; +any boolean or struct value; or non-nil for any other types. e.g.