These operations would help but they're not unique to errors, even though they most often arise in that context.
Since this proposal relies on some form of generics to implement As
, why not make the interface and both operations generic so we can Is
or As
a wrapped io.Reader
just as easily?
Right, but it would be
errors.As(wrappedReader, io.ReaderAt)