title: sync.WaitGroup and nested loops
body: <p>I'd like to add concurrency for iterating nested loops but having a trouble. What's wrong with this example usage of sync.WaitGroup? </p>
  
  <pre><code>originCities := [3]string{"LED", "MOW", "PRS"}
  destinationCities := [2]string{"UKT", "AAC"}
  
  wg := &amp;sync.WaitGroup{}
  wg.Add(len(originCities) * len(destinationCities))
  
  for _, originIata := range originCities {
      for _, destinationIata := range destinationCities {
          go func () {
              fmt.Println(originIata)
              fmt.Println(destinationIata)
              wg.Done()
          }()
      }
  }
  wg.Wait()
  </code></pre>
  
  <p>I'm getting </p>
  
  <blockquote>
    <p>PRS AAC PRS AAC PRS AAC PRS AAC PRS AAC PRS AAC</p>
  </blockquote>
  
  <p>So as you may see it's skipping first elements of both array and iterating only the last ones. Any ideas how to fix this behavior?</p>