title: generate a random bool in go
body: <p>What's the fastest way to generate a random bool in go ? </p>
  
  <p>currently I'm doing like this : </p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "math/rand"
      "time"
  )
  
  // random generator
  var src = rand.NewSource(time.Now().UnixNano())
  var r = rand.New(src)
  
  func main() {
      for i := 0; i &lt; 100; i++ {
          // generate a random boolean and print it 
          fmt.Printf("bool: %s\n", r.Intn(2) != 0)
      }
  }
  </code></pre>
  
  <p>How can I improve this ? </p>