Even simpler:
r, err := try os.Open("blah.text")
Similar to Swift and what Rust used to have.
"try foo()" means: if "foo()" returns an error, return the error to the
caller.
If function returns multiple values, it would return zero value for
non-error values.
I believe now Rust has the following syntax:
r, err := os.Open("blah.text")?
Either way, even less boilerplate.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.