summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/math
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/functions/math')
-rw-r--r--docs/content/en/functions/math/Counter.md12
-rw-r--r--docs/content/en/functions/math/MaxInt64.md27
2 files changed, 33 insertions, 6 deletions
diff --git a/docs/content/en/functions/math/Counter.md b/docs/content/en/functions/math/Counter.md
index 16456cec6..eec4df8b3 100644
--- a/docs/content/en/functions/math/Counter.md
+++ b/docs/content/en/functions/math/Counter.md
@@ -12,14 +12,14 @@ params:
The counter is global for both monolingual and multilingual sites, and its initial value for each build is 1.
-```go-html-template
-{{ warnf "single.html called %d times" math.Counter }}
+```go-html-template {file="layouts/page.html"}
+{{ warnf "page.html called %d times" math.Counter }}
```
-```sh
-WARN single.html called 1 times
-WARN single.html called 2 times
-WARN single.html called 3 times
+```text
+WARN page.html called 1 times
+WARN page.html called 2 times
+WARN page.html called 3 times
```
Use this function to:
diff --git a/docs/content/en/functions/math/MaxInt64.md b/docs/content/en/functions/math/MaxInt64.md
new file mode 100644
index 000000000..ee4f68ffd
--- /dev/null
+++ b/docs/content/en/functions/math/MaxInt64.md
@@ -0,0 +1,27 @@
+---
+title: math.MaxInt64
+description: Returns the maximum value for a signed 64-bit integer.
+categories: []
+keywords: []
+params:
+ functions_and_methods:
+ aliases: []
+ returnType: int64
+ signatures: [math.MaxInt64]
+---
+
+{{< new-in 0.147.3 />}}
+
+```go-html-template
+{{ math.MaxInt64 }} → 9223372036854775807
+```
+
+This function is helpful for simulating a loop that continues indefinitely until a break condition is met. For example:
+
+```go-html-template
+{{ range math.MaxInt64 }}
+ {{ if eq . 42 }}
+ {{ break }}
+ {{ end }}
+{{ end }}
+```