title: Golang Concurrency Issue
body: <p>I am learning Golang concurrency and have written a program to display URL's in order. I expect the code to return<br>
  <a href="http://bing.com" rel="nofollow noreferrer">http://bing.com</a><strong>*
  <a href="http://google.com" rel="nofollow noreferrer">http://google.com</a>*</strong></p>
  
  <p>But it always returns http:/google.com***  . As if the variable is being overwritten.Since i am using goroutines i would expect it to return both values at the sametime. </p>
  
  <pre><code>func check(u string) string {
  tmpres := u+"*****"
  return tmpres
  }
  
  func IsReachable(url string) string {
  ch := make(chan string, 1)
  go func() { 
  
      ch &lt;- check(url) 
  
       }()
  select {
  case reachable := &lt;-ch:
      // use err and reply
      return reachable
  case &lt;-time.After(3* time.Second):
      // call timed out
      return "none"
  }
     }
  
  
  
  func main() {
  
  var urls = []string{
    "http://bing.com/",
    "http://google.com/",
  }
  
  for _, url := range urls {
      go func() {
       fmt.Println(IsReachable(url)) 
       }()
  }
  time.Sleep(1 * time.Second)
    }
  </code></pre>