# math.MaxInt64
> 返回有符号 64 位整数的最大值。
- 官方英文原文：https://gohugo.io/functions/math/maxint64/
- 本页规范地址：https://hugozh.cn/functions/math/maxint64/
- 最近更新：2026-10-02
- 最后提交：912b1d3 chore(site): 添加 static/CNAME（hugozh.cn），供 GitHub Pages 等平台绑定自定义域名
- 签名：math.MaxInt64
- 返回类型：int64
- 站点：Hugo 中文文档（https://hugozh.cn/）· 社区维护的非官方中文翻译，如有出入以官方英文原文为准

---
**（0.147.3 新增）**

```go-html-template
{{ math.MaxInt64 }} → 9223372036854775807
```

当需要模拟一个持续到满足中断条件才结束的循环时，这个函数很有用。例如：

```go-html-template
{{ range math.MaxInt64 }}
  {{ if eq . 42 }}
    {{ break }}
  {{ end }}
{{ end }}
```

