Sorry, I mean return if not nil, so it should be *rinn* or please find some
better keyword for this :^).
On Monday, August 31, 2020 at 9:15:31 AM UTC+7 Zakaria bin Haris wrote:
> Hi, gophers!
>
> Idk if this has been proposed or discussed before.
>
> Given the last error handling abbreviation proposal is rejected. How about
> some simple syntactic sugar like this:
>
> *rin* Something()
>
> Which is just a sugar for:
>
> if err := Something(); err != nil {
> return err
> }
>
> To make it worth the new keyword make it so that:
>
> *rin* v := Something()
>
> equals to:
>
> v, err := Something()
> if err != nil {
> return err
> }
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/c8683351-b51a-4a6d-bc3a-27a3c1b73ffcn%40googlegroups.com.