gobyexample icon indicating copy to clipboard operation
gobyexample copied to clipboard

Proposal: Add Go 1.13 error handling to Error section

Open ngfgrant opened this issue 5 years ago • 3 comments

Hi thanks for this super site.

I am going through it line by line at the moment and wondered if it would be worth making an addition to the existing Error page? Specifically, the new %w, Unwrap, Is and As methods in error. I don't think the new methods should replace the existing content, only compliment it.

I am happy to contribute the example should this idea be accepted.

ngfgrant avatar May 05 '20 14:05 ngfgrant

I think it's a good idea in general, but the devil is in the details. Wrapping errors is a power use, but gobyexample tries to stick to simpler concepts. Detailed discussion can take over a concrete PR, I just wanted to provide some background.

eliben avatar May 05 '20 15:05 eliben

Hi, I have prepared an answer to the problem, raised in the link below. Hope you enjoy it :) 334

Omid-SH avatar Feb 03 '21 20:02 Omid-SH

@Omid-SH consider submitting a PR with a simple example to this repository. That will be easier to review.

eliben avatar Feb 15 '21 17:02 eliben