title: What is the method set of `sync.WaitGroup`?
body: <p>I have this simple program below</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "sync"
      "time"
  )
  
  var wg sync.WaitGroup
  
  func main() {
      wg.Add(1)
  
      go func() {
          fmt.Println("starting...")
          time.Sleep(1 * time.Second)
          fmt.Println("done....")
          wg.Done()
      } ()
  
      wg.Wait()
  
  }
  </code></pre>
  
  <p>Notice that I use <code>var wg sync.WaitGroup</code> as a value, not a pointer. But the <a href="https://golang.org/pkg/sync/" rel="noreferrer">page for the sync package</a> specifies that the <code>Add</code>, <code>Done</code> and <code>Wait</code> function take a <code>*sync.WaitGroup</code>. </p>
  
  <p>Why/How does this work?</p>