On Sunday, 30 July 2023 at 06:57:15 UTC+1 DrGo wrote:
I looked at the long list of proposals to improve error handling in go but I have not seen the one I am describing below. There is a meta-ticket here: https://github.com/golang/go/issues/40432 Under the section "Simplifications of if err != nil, to reduce boilerplate" I found a link to https://github.com/golang/go/issues/32946 which seems very similar to yours, using keyword "onErr" after a semicolon, instead of "orelse". if c, err := fn(); onErr { return 0, 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/0ee7e166-9aac-402c-871c-5e143a606fdbn%40googlegroups.com.