mirror of
https://github.com/rclone/rclone.git
synced 2024-12-11 09:41:47 +01:00
f7af730b50
This is using godep to manage the vendor directory.
25 lines
391 B
Go
25 lines
391 B
Go
// Go 1.1 and later compatibility functions
|
|
//
|
|
// +build go1.1
|
|
|
|
package swift
|
|
|
|
import (
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
// Cancel the request
|
|
func cancelRequest(transport http.RoundTripper, req *http.Request) {
|
|
if tr, ok := transport.(interface {
|
|
CancelRequest(*http.Request)
|
|
}); ok {
|
|
tr.CancelRequest(req)
|
|
}
|
|
}
|
|
|
|
// Reset a timer
|
|
func resetTimer(t *time.Timer, d time.Duration) {
|
|
t.Reset(d)
|
|
}
|