Back to Hugo

math.MaxInt64

docs/content/en/functions/math/MaxInt64.md

0.161.1321 B
Original Source

{{< 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 }}