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