Standard library / math

math.MaxUint64

Maximum representable uint64 value; useful for bounds checks. Expected stdout: '18446744073709551615\n'.

Formal Syntax & Structure

go syntaxgo
const MaxUint64 = 1<<64 - 1

Working Example

Example Snippetgo
package main
import (  "fmt"  "math")
func main() {  fmt.Println(uint64(math.MaxUint64))}
Go Reference