Predeclared type
Go byte type
Alias of uint8, with identical type identity and range. Useful when data represents bytes rather than arbitrary small numbers. Example output: '65'.
Formal Syntax & Structure
go syntaxgo
byteWorking Example
Example Snippetgo
package main
import ( "fmt")
func main() { var b byte = 65 var n uint8 = b fmt.Println(n)}