title: Why is deadlock posssible here?
body: <p>I am currently learning about deadlocks in Go and when they can appear. I am viewing this code. I know a deadlock is possible here, but I cannot find it. Can someone please explain it to me?</p>
  <pre><code>package main
  
  import &quot;fmt&quot;
  
  func reuters(ch chan string) {
      ch &lt;- &quot;REUTERS&quot;
  }
  func bloomberg(ch chan string) {
      ch &lt;- &quot;BLOOMBERG&quot;
  }
  func newsReader(reutersCh chan string, bloombergCh chan string) {
      ch := make(chan string, 5)
      go func() {
          ch &lt;- (&lt;-reutersCh)
      }()
      go func() {
          ch &lt;- (&lt;-bloombergCh)
      }()
      x := &lt;-ch
      fmt.Printf(&quot;got news from %s \n&quot;, x)
  }
  func main() {
      reutersCh := make(chan string)
      bloombergCh := make(chan string)
      go reuters(reutersCh)
      go bloomberg(bloombergCh)
      newsReader(reutersCh, bloombergCh)
      newsReader(reutersCh, bloombergCh)
  }
  </code></pre>