зеркало из https://github.com/docker/engine-api.git
Merge pull request #76 from calavera/fix_canceler_14_conversion
Fix implicit conversion of transport sender in canceler_14.
This commit is contained in:
Коммит
96789fcb9a
|
@ -16,7 +16,7 @@ type requestCanceler interface {
|
|||
CancelRequest(*http.Request)
|
||||
}
|
||||
|
||||
func canceler(client transport.Client, req *http.Request) func() {
|
||||
func canceler(client transport.Sender, req *http.Request) func() {
|
||||
rc, ok := client.(requestCanceler)
|
||||
if !ok {
|
||||
return func() {}
|
||||
|
|
|
@ -36,7 +36,7 @@ func Do(ctx context.Context, client transport.Sender, req *http.Request) (*http.
|
|||
client = http.DefaultClient
|
||||
}
|
||||
|
||||
// Request cancelation changed in Go 1.5, see cancelreq.go and cancelreq_go14.go.
|
||||
// Request cancelation changed in Go 1.5, see canceler.go and canceler_go14.go.
|
||||
cancel := canceler(client, req)
|
||||
|
||||
type responseAndError struct {
|
||||
|
|
Загрузка…
Ссылка в новой задаче