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.
This commit is contained in:
Cameron Moore authored and Bjørn Erik Pedersen committed 2016-03-16 20:05:48 +01:00
1 parent 123ffc8222
commit d7599307c9
1 file changed
+3 -3
+3 -3
View File
@@ -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.