mirror of
https://github.com/rclone/rclone.git
synced 2025-08-19 01:46:31 +02:00
Require go1.7 for compilation #2154
* Update the travis tests to exclude go1.6 * Update the compile check to require go1.7+ * Update misc go1.6 workarounds marked in the source
This commit is contained in:
@@ -250,7 +250,7 @@ func cleanAuths(buf []byte) []byte {
|
||||
func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error) {
|
||||
// Get transactions per second token first if limiting
|
||||
if tpsBucket != nil {
|
||||
tbErr := tpsBucket.Wait(context.Background()) // FIXME switch to req.Context() when we drop go1.6 support
|
||||
tbErr := tpsBucket.Wait(req.Context())
|
||||
if tbErr != nil {
|
||||
fs.Errorf(nil, "HTTP token bucket error: %v", err)
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ func TestDurationString(t *testing.T) {
|
||||
in time.Duration
|
||||
want string
|
||||
}{
|
||||
// {time.Duration(0), "0s"}, doesn't work on go1.6
|
||||
{time.Duration(0), "0s"},
|
||||
{time.Second, "1s"},
|
||||
{time.Minute, "1m0s"},
|
||||
{time.Duration(DurationOff), "off"},
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//+build !go1.6
|
||||
//+build !go1.7
|
||||
|
||||
package fs
|
||||
|
||||
// Upgrade to Go version 1.6 to compile rclone - latest stable go
|
||||
// Upgrade to Go version 1.7 to compile rclone - latest stable go
|
||||
// compiler recommended.
|
||||
func init() { Go_version_1_6_required_for_compilation() }
|
||||
func init() { Go_version_1_7_required_for_compilation() }
|
||||
|
Reference in New Issue
Block a user