If you really care to "catch" errors, you want this: https://github.com/golang/go/issues/27519
If all you need is to allocate a line to check an error and take an action, you want this: https://github.com/golang/go/issues/32611 But it's all moot. the Go team has told us we must prove that try is inadequate for existing Go projects, and altho that can be proved, it won't be clear for a couple years until use of Error Values propagates. On Thursday, June 27, 2019 at 11:44:23 AM UTC-7, Nate Finch wrote: > > I really don't like the try proposal > <https://github.com/golang/go/issues/32437>, because I think it hurts > readabiity of the code. But I think the fix is not too hard, so I made a > counter proposal, catch: > > https://github.com/golang/go/issues/32811 > > Catch works just like try, except it has to be a statement and has to be > passed an error explicitly, rather than returning arguments to the left > hand side. This make the conversion of old code to new code look a lot > more like normal go code. > > > -- 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/68e3407a-57cc-42f2-8819-7c0369f5ca4b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.