]> Cypherpunks repositories - gostls13.git/commit
net/url: make *url.Error implement net.Error
authorDave Cheney <dave@cheney.net>
Sat, 10 Oct 2015 03:21:42 +0000 (14:21 +1100)
committerDave Cheney <dave@cheney.net>
Sat, 10 Oct 2015 11:32:58 +0000 (11:32 +0000)
commitfb3f152c196269d7a0fc9246226de478866073c1
tree2af7670aa6678a89607acd93bb9997b836d8ae80
parent2d5601d85cff9b11acc622833ccefa808e1cdf08
net/url: make *url.Error implement net.Error

Fixes #12866

net/http.Client returns some errors wrapped in a *url.Error. To avoid
the requirement to unwrap these errors to determine if the cause was
temporary or a timeout, make *url.Error implement net.Error directly.

Change-Id: I1ba84ecc7ad5147a40f056ff1254e60290152408
Reviewed-on: https://go-review.googlesource.com/15672
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/client_test.go
src/net/url/url.go
src/net/url/url_test.go