Background: I was writing an HTTP proxy using net.http which supports both HTTP/1 and HTTP/2. I need to detect errors and do correct things according to RFC (https://http2.github.io/http2-spec/#CONNECT).
It turns out that net.http has its own bundled copy of x/net/http2 (https://golang.org/src/net/http/h2_bundle.go) with nothing exported. So I cannot do things like var h2err http2.StreamError if errors.As(err, &h2err) { // dealing with errors it will never match because the actual error is `http.http2StreamError` which is not exported. In this case, what's the correct way to detect http2 specific errors? -- 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/46a9e5fb-4902-4c36-8dc7-4efb069b0515%40googlegroups.com.