mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 11:35:21 +08:00
build: drop support for go1.9
This commit is contained in:
parent
ef7b001626
commit
89b6d89077
|
@ -1,7 +1,4 @@
|
|||
// Package restic serves a remote suitable for use with restic
|
||||
|
||||
// +build go1.9
|
||||
|
||||
package restic
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// +build go1.9
|
||||
|
||||
package restic
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// +build go1.9
|
||||
|
||||
package restic
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// Serve restic tests set up a server and run the integration tests
|
||||
// for restic against it.
|
||||
|
||||
// +build go1.9
|
||||
|
||||
package restic
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
// Build for unsupported platforms to stop go complaining
|
||||
// about "no buildable Go source files "
|
||||
|
||||
// +build !go1.9
|
||||
|
||||
package restic
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
|
||||
// Command definition is nil to show not implemented
|
||||
var Command *cobra.Command = nil
|
|
@ -1,5 +1,3 @@
|
|||
// +build go1.9
|
||||
|
||||
package restic
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
// +build go1.9
|
||||
|
||||
package restic
|
||||
|
||||
import (
|
||||
"net"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Addr implements net.Addr for stdin/stdout.
|
||||
|
@ -52,3 +51,23 @@ func (s *StdioConn) LocalAddr() net.Addr {
|
|||
func (s *StdioConn) RemoteAddr() net.Addr {
|
||||
return Addr{}
|
||||
}
|
||||
|
||||
// SetDeadline sets the read/write deadline.
|
||||
func (s *StdioConn) SetDeadline(t time.Time) error {
|
||||
err1 := s.stdin.SetReadDeadline(t)
|
||||
err2 := s.stdout.SetWriteDeadline(t)
|
||||
if err1 != nil {
|
||||
return err1
|
||||
}
|
||||
return err2
|
||||
}
|
||||
|
||||
// SetReadDeadline sets the read/write deadline.
|
||||
func (s *StdioConn) SetReadDeadline(t time.Time) error {
|
||||
return s.stdin.SetReadDeadline(t)
|
||||
}
|
||||
|
||||
// SetWriteDeadline sets the read/write deadline.
|
||||
func (s *StdioConn) SetWriteDeadline(t time.Time) error {
|
||||
return s.stdout.SetWriteDeadline(t)
|
||||
}
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
//+build go1.10
|
||||
|
||||
// Deadline setting for go1.10+
|
||||
|
||||
package restic
|
||||
|
||||
import "time"
|
||||
|
||||
// SetDeadline sets the read/write deadline.
|
||||
func (s *StdioConn) SetDeadline(t time.Time) error {
|
||||
err1 := s.stdin.SetReadDeadline(t)
|
||||
err2 := s.stdout.SetWriteDeadline(t)
|
||||
if err1 != nil {
|
||||
return err1
|
||||
}
|
||||
return err2
|
||||
}
|
||||
|
||||
// SetReadDeadline sets the read/write deadline.
|
||||
func (s *StdioConn) SetReadDeadline(t time.Time) error {
|
||||
return s.stdin.SetReadDeadline(t)
|
||||
}
|
||||
|
||||
// SetWriteDeadline sets the read/write deadline.
|
||||
func (s *StdioConn) SetWriteDeadline(t time.Time) error {
|
||||
return s.stdout.SetWriteDeadline(t)
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
//+build go1.9,!go1.10
|
||||
|
||||
// Fallback deadline setting for pre go1.10
|
||||
|
||||
package restic
|
||||
|
||||
import "time"
|
||||
|
||||
// SetDeadline sets the read/write deadline.
|
||||
func (s *StdioConn) SetDeadline(t time.Time) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetReadDeadline sets the read/write deadline.
|
||||
func (s *StdioConn) SetReadDeadline(t time.Time) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetWriteDeadline sets the read/write deadline.
|
||||
func (s *StdioConn) SetWriteDeadline(t time.Time) error {
|
||||
return nil
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
//+build go1.9
|
||||
|
||||
// Package webdav implements a WebDAV server backed by rclone VFS
|
||||
package webdav
|
||||
|
||||
import (
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// We skip tests on platforms with troublesome character mappings
|
||||
|
||||
//+build !windows,!darwin,go1.9
|
||||
//+build !windows,!darwin
|
||||
|
||||
package webdav
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
// Build for webdav for unsupported platforms to stop go complaining
|
||||
// about "no buildable Go source files "
|
||||
|
||||
// +build !go1.9
|
||||
|
||||
package webdav
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
|
||||
// Command definition is nil to show not implemented
|
||||
var Command *cobra.Command = nil
|
|
@ -1,7 +1,7 @@
|
|||
//+build !go1.9
|
||||
//+build !go1.10
|
||||
|
||||
package fs
|
||||
|
||||
// Upgrade to Go version 1.9 to compile rclone - latest stable go
|
||||
// Upgrade to Go version 1.10 to compile rclone - latest stable go
|
||||
// compiler recommended.
|
||||
func init() { Go_version_1_9_required_for_compilation() }
|
||||
func init() { Go_version_1_10_required_for_compilation() }
|
||||
|
|
Loading…
Reference in New Issue
Block a user