Debian Codegraph @

docs/content/en/functions/compare/Eq.md

raw
1 ---
2 title: compare.Eq
3 description: Returns the boolean truth of arg1 == arg2 || arg1 == arg3.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 aliases: [eq]
9 returnType: bool
10 signatures: ['compare.Eq ARG1 ARG2 [ARG...]']
11 aliases: [/functions/eq]
12 ---
13
14 ```go-html-template
15 {{ eq 1 1 }} → true
16 {{ eq 1 2 }} → false
17
18 {{ eq 1 1 1 }} → true
19 {{ eq 1 1 2 }} → true
20 {{ eq 1 2 1 }} → true
21 {{ eq 1 2 2 }} → false
22 ```
23
24 You can also use the `compare.Eq` function to compare strings, boolean values, dates, slices, maps, and pages.