mirror of
https://github.com/rclone/rclone.git
synced 2026-01-03 17:13:18 +00:00
Add missing vendor files
This commit is contained in:
19
vendor/golang.org/x/net/context/ctxhttp/cancelreq.go
generated
vendored
Normal file
19
vendor/golang.org/x/net/context/ctxhttp/cancelreq.go
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build go1.5
|
||||
|
||||
package ctxhttp
|
||||
|
||||
import "net/http"
|
||||
|
||||
func canceler(client *http.Client, req *http.Request) func() {
|
||||
// TODO(djd): Respect any existing value of req.Cancel.
|
||||
ch := make(chan struct{})
|
||||
req.Cancel = ch
|
||||
|
||||
return func() {
|
||||
close(ch)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user