]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blob - vendor/github.com/fsouza/go-dockerclient/cancelable_go14.go
3c203986fc6bae97d1c30558c854e2418b7d91ac
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / fsouza / go-dockerclient / cancelable_go14.go
1 // Copyright 2016 go-dockerclient authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // +build !go1.5
6
7 package docker
8
9 import "net/http"
10
11 func cancelable(client *http.Client, req *http.Request) func() {
12 return func() {
13 if rc, ok := client.Transport.(interface {
14 CancelRequest(*http.Request)
15 }); ok {
16 rc.CancelRequest(req)
17 }
18 }
19 }