From 4d0fdd9b113958ad4dde72d985d816bc0bac363f Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Thu, 22 May 2025 18:03:45 -0400 Subject: [PATCH] Correct docs for Go's `text/html` built-in template functions Source: https://pkg.go.dev/text/template#hdr-Functions The comparison functions the greater-than-or-equal-to and less-than-or-equal-to are `ge` and `le`, not `gte` and `lte`. I got an error rendering my template before I realized this. --- docs/custom-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/custom-api.md b/docs/custom-api.md index 3f603d8..ba294e1 100644 --- a/docs/custom-api.md +++ b/docs/custom-api.md @@ -464,9 +464,9 @@ The following helper functions provided by Go's `text/template` are available: - `eq(a, b any) bool`: Compares two values for equality. - `ne(a, b any) bool`: Compares two values for inequality. - `lt(a, b any) bool`: Compares two values for less than. -- `lte(a, b any) bool`: Compares two values for less than or equal to. +- `le(a, b any) bool`: Compares two values for less than or equal to. - `gt(a, b any) bool`: Compares two values for greater than. -- `gte(a, b any) bool`: Compares two values for greater than or equal to. +- `ge(a, b any) bool`: Compares two values for greater than or equal to. - `and(args ...bool) bool`: Returns true if **all** arguments are true; accepts two or more boolean values. - `or(args ...bool) bool`: Returns true if **any** argument is true; accepts two or more boolean values. - `not(a bool) bool`: Returns the opposite of the value.