diff --git a/content/en/functions/compare/Eq.md b/content/en/functions/compare/Eq.md index 49350e676..a877aeddf 100644 --- a/content/en/functions/compare/Eq.md +++ b/content/en/functions/compare/Eq.md @@ -25,3 +25,5 @@ aliases: [/functions/eq] {{ eq 1 2 1 }} → true {{ eq 1 2 2 }} → false ``` + +You can also use the `compare.Eq` function to compare strings, boolean values, dates, slices, maps, and pages. diff --git a/content/en/functions/compare/Ge.md b/content/en/functions/compare/Ge.md index 479ecf990..ce1fd2302 100644 --- a/content/en/functions/compare/Ge.md +++ b/content/en/functions/compare/Ge.md @@ -30,3 +30,11 @@ aliases: [/functions/ge] {{ ge 2 1 2 }} → true {{ ge 2 2 1 }} → true ``` + +Use the `compare.Ge` function to compare other data types as well: + +```go-html-template +{{ ge "ab" "a" }} → true +{{ ge time.Now (time.AsTime "1964-12-30") }} → true +{{ ge true false }} → true +``` diff --git a/content/en/functions/compare/Gt.md b/content/en/functions/compare/Gt.md index 0af289ce2..9ff3b0c89 100644 --- a/content/en/functions/compare/Gt.md +++ b/content/en/functions/compare/Gt.md @@ -30,3 +30,11 @@ aliases: [/functions/gt] {{ gt 2 1 2 }} → false {{ gt 2 2 1 }} → false ``` + +Use the `compare.Gt` function to compare other data types as well: + +```go-html-template +{{ gt "ab" "a" }} → true +{{ gt time.Now (time.AsTime "1964-12-30") }} → true +{{ gt true false }} → true +``` diff --git a/content/en/functions/compare/Le.md b/content/en/functions/compare/Le.md index 319d376f6..a0fbed29d 100644 --- a/content/en/functions/compare/Le.md +++ b/content/en/functions/compare/Le.md @@ -30,3 +30,11 @@ aliases: [/functions/le] {{ le 2 1 2 }} → false {{ le 2 2 1 }} → false ``` + +Use the `compare.Le` function to compare other data types as well: + +```go-html-template +{{ le "ab" "a" }} → false +{{ le time.Now (time.AsTime "1964-12-30") }} → false +{{ le true false }} → false +``` diff --git a/content/en/functions/compare/Lt.md b/content/en/functions/compare/Lt.md index 3fe8f1d2c..b306a97b5 100644 --- a/content/en/functions/compare/Lt.md +++ b/content/en/functions/compare/Lt.md @@ -30,3 +30,11 @@ aliases: [/functions/lt] {{ lt 2 1 2 }} → false {{ lt 2 2 1 }} → false ``` + +Use the `compare.Lt` function to compare other data types as well: + +```go-html-template +{{ lt "ab" "a" }} → false +{{ lt time.Now (time.AsTime "1964-12-30") }} → false +{{ lt true false }} → false +``` diff --git a/content/en/functions/compare/Ne.md b/content/en/functions/compare/Ne.md index 2d9f826fc..dbe0a3898 100644 --- a/content/en/functions/compare/Ne.md +++ b/content/en/functions/compare/Ne.md @@ -25,3 +25,5 @@ aliases: [/functions/ne] {{ ne 1 2 1 }} → false {{ ne 1 2 2 }} → true ``` + +You can also use the `compare.Ne` function to compare strings, boolean values, dates, slices, maps, and pages.