Debian Codegraph @

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

raw
1 ---
2 title: compare.Gt
3 description: Returns the boolean truth of arg1 > arg2 && arg1 > arg3.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 aliases: [gt]
9 returnType: bool
10 signatures: ['compare.Gt ARG1 ARG2 [ARG...]']
11 aliases: [/functions/gt]
12 ---
13
14 ```go-html-template
15 {{ gt 1 1 }} → false
16 {{ gt 1 2 }} → false
17 {{ gt 2 1 }} → true
18
19 {{ gt 1 1 1 }} → false
20 {{ gt 1 1 2 }} → false
21 {{ gt 1 2 1 }} → false
22 {{ gt 1 2 2 }} → false
23
24 {{ gt 2 1 1 }} → true
25 {{ gt 2 1 2 }} → false
26 {{ gt 2 2 1 }} → false
27 ```
28
29 Use the `compare.Gt` function to compare other data types as well:
30
31 ```go-html-template
32 {{ gt "ab" "a" }} → true
33 {{ gt time.Now (time.AsTime "1964-12-30") }} → true
34 {{ gt true false }} → true
35 ```