Created
July 15, 2022 14:22
-
-
Save nwillc/398dcbfa6c5dca6f9061c37c114c6b3d to your computer and use it in GitHub Desktop.
Go Error-Result example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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