The idea of As is to find an error in the wrapped errors, the error chain,
which can be cast to the type you pass.
I played a bit with them and made some examples:
https://github.com/AndersonQ/go1_13_errors/blob/master/main.go#L103
Have a look in the implementation of As, it's nice and simple to
Thx, examples helped allot in understanding
On Thursday, October 24, 2019 at 6:53:32 PM UTC+2, Jake Montgomery wrote:
>
> I have not done much with the new errors stuff, but I'll try to help.
>
> I assume you have read https://github.com/golang/go/wiki/ErrorValueFAQ
> and https://blog.golang.or
I have not done much with the new errors stuff, but I'll try to help.
I assume you have read https://github.com/golang/go/wiki/ErrorValueFAQ and
https://blog.golang.org/go1.13-errors. There may be other posts as well.
These new error functions, Is() and As() are about error types. It looks
l