Skip to content

Instantly share code, notes, and snippets.

@robmerrell
Created May 27, 2013 19:01
Show Gist options
  • Save robmerrell/5658566 to your computer and use it in GitHub Desktop.
Save robmerrell/5658566 to your computer and use it in GitHub Desktop.
for !chClosed {
select {
case rows, chanOk := <-ch:
chClosed = !chanOk
if chanOk {
rows.Scan(&showType)
fmt.Println(showType)
}
case err := <-errCh:
if err != nil {
panic(err)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment