Skip to content

Instantly share code, notes, and snippets.

@collinvandyck
Last active August 29, 2015 14:16
Show Gist options
  • Select an option

  • Save collinvandyck/c87357b077fe488db8c3 to your computer and use it in GitHub Desktop.

Select an option

Save collinvandyck/c87357b077fe488db8c3 to your computer and use it in GitHub Desktop.
is there something like this in the goland stdlib?
func adaptToChanErr(delegate func() error) chan error {
ch := make(chan error)
go func() { ch <- delegate() }()
return ch
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment