Standard library / math
math.MaxUint16
Maximum representable uint16 value; useful for bounds checks. Expected stdout: '65535\n'.
Formal Syntax & Structure
go syntaxgo
const MaxUint16 = 1<<16 - 1Working Example
Example Snippetgo
package main
import ( "fmt" "math")
func main() { fmt.Println(uint16(math.MaxUint16))}