Skip to content

Instantly share code, notes, and snippets.

@duythinht
Created November 22, 2016 05:08
Show Gist options
  • Save duythinht/e3c12b02b2fe41e54921ffb2793f158a to your computer and use it in GitHub Desktop.
Save duythinht/e3c12b02b2fe41e54921ffb2793f158a to your computer and use it in GitHub Desktop.
Try, error handling with Go.
func func1(returnError bool) (&bool, error);
result, error := Do(func(try) {
result0 := try.F1(func1(false))
result1 := try.F1(func1(!result0))
result2 := try.F1(func1(result1))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment