compare.Eq
Returns the boolean truth of arg1 == arg2 || arg1 == arg3.
Syntax
compare.Eq ARG1 ARG2 [ARG...]
Returns
bool
Alias
eq
{{ eq 1 1 }} → true
{{ eq 1 2 }} → false
{{ eq 1 1 1 }} → true
{{ eq 1 1 2 }} → true
{{ eq 1 2 1 }} → true
{{ eq 1 2 2 }} → falseYou can also use the compare.Eq function to compare strings, boolean values, dates, slices, maps, and pages.
Last updated:
April 10, 2025
:
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)
Improve this page