Skip to content

Instantly share code, notes, and snippets.

@nwillc
Created July 15, 2022 14:22
Show Gist options
  • Save nwillc/398dcbfa6c5dca6f9061c37c114c6b3d to your computer and use it in GitHub Desktop.
Save nwillc/398dcbfa6c5dca6f9061c37c114c6b3d to your computer and use it in GitHub Desktop.
Go Error-Result example
func foo() *Result[int] {...}
func fooBar() *Result[string] {
return Map(foo(), func(i int) *Result[string] {
return NewResult(fmt.Print(i))
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment