1// Copyright 2015 The Go 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// borrowed from golang/net/context/ctxhttp/cancelreq_go14.go 6 7// +build !go1.5 8 9package client 10 11import "net/http" 12 13func requestCanceler(tr CancelableTransport, req *http.Request) func() { 14 return func() { 15 tr.CancelRequest(req) 16 } 17} 18