mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-12 18:24:41 -04:00
content: Document math.MaxInt64
This commit is contained in:
parent
0d57ff7d48
commit
f715265d3b
27
content/en/functions/math/MaxInt64.md
Normal file
27
content/en/functions/math/MaxInt64.md
Normal file
@ -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.148.0 />}}
|
||||||
|
|
||||||
|
```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 }}
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user