Skip to content

Instantly share code, notes, and snippets.

@jonbodner
Created August 24, 2017 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonbodner/1fcbe7c54724f116d8a00a0fde7751bc to your computer and use it in GitHub Desktop.
Save jonbodner/1fcbe7c54724f116d8a00a0fde7751bc to your computer and use it in GitHub Desktop.
future-blog-post-11
func (f *futureImpl) Then(next Step) Interface {
nextFuture := New(func() (interface{}, error) {
result, err := f.Get()
if err != nil {
return result, err
}
return next(result)
})
return nextFuture
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment