On the go playground, this code
package main
import (
"fmt"
)
var a = []byte{ 0xff, 0xaa, 0x66, 0x33, 0x00 }
func main() {
for b := range a {
fmt.Printf("%T
", b)
}
}
prints
int
int
int
int
int
Why in the world wouldn't a slice of bytes give you bytes when you iterate through it (or at least uint8 or something)?
Here's the link to the playground: https://play.golang.org/p/V1uZZWWq-X.