HUGO
Menu
GitHub 90265 stars Mastodon

math.MaxInt64

Returns the maximum value for a signed 64-bit integer.
Syntax
math.MaxInt64
Returns
int64
New in v0.147.3

Usage

The math.MaxInt64 function returns the maximum value for a signed 64-bit integer. Use this function with the range statement to create a loop that continues until a break condition is met.

Examples

{{ math.MaxInt64 }} → 9223372036854775807

Looping until a break condition is met:

{{ range math.MaxInt64 }}
  {{ if eq . 42 }}
    {{ break }}
  {{ end }}
{{ end }}