Generate random bytes in golang

Need to generate a set of random bytes?

package main

import (
"crypto/rand"
"fmt"
)

func GenRandomBytes(size int) (blk []byte, err error) {
blk = make([]byte, size)
_, err = rand.Read(blk)
return
}

func main() {
if blk, err := GenRandomBytes(32); err != nil {
panic(err)
} else {
sblk := string(blk)
fmt.Printf("sblk: %s\n", sblk)
fmt.Printf("hex : %x\n", blk)
}
}