code: func RandToken(size int) string {
  	buf := make([]byte, size)
  	if n, err := rand.Read(buf); err != nil || n != len(buf) {
  		panic("failed to get random: " + err.Error())
  	}
  	return fmt.Sprintf("%x", buf)
  }
docs: // RandToken genererates (with crypto/rand.Read) and returns a token
  // that is the hex version (2x size) of size bytes of randomness.