build: drop support for go1.9
This commit is contained in:
parent
ef7b001626
commit
89b6d89077
13 changed files with 26 additions and 90 deletions
|
@ -1,7 +1,4 @@
|
||||||
// Package restic serves a remote suitable for use with restic
|
// Package restic serves a remote suitable for use with restic
|
||||||
|
|
||||||
// +build go1.9
|
|
||||||
|
|
||||||
package restic
|
package restic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// +build go1.9
|
|
||||||
|
|
||||||
package restic
|
package restic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// +build go1.9
|
|
||||||
|
|
||||||
package restic
|
package restic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
// Serve restic tests set up a server and run the integration tests
|
// Serve restic tests set up a server and run the integration tests
|
||||||
// for restic against it.
|
// for restic against it.
|
||||||
|
|
||||||
// +build go1.9
|
|
||||||
|
|
||||||
package restic
|
package restic
|
||||||
|
|
||||||
import (
|
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
|
package restic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
// +build go1.9
|
|
||||||
|
|
||||||
package restic
|
package restic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Addr implements net.Addr for stdin/stdout.
|
// Addr implements net.Addr for stdin/stdout.
|
||||||
|
@ -52,3 +51,23 @@ func (s *StdioConn) LocalAddr() net.Addr {
|
||||||
func (s *StdioConn) RemoteAddr() net.Addr {
|
func (s *StdioConn) RemoteAddr() net.Addr {
|
||||||
return 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
|
package webdav
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
//
|
//
|
||||||
// We skip tests on platforms with troublesome character mappings
|
// We skip tests on platforms with troublesome character mappings
|
||||||
|
|
||||||
//+build !windows,!darwin,go1.9
|
//+build !windows,!darwin
|
||||||
|
|
||||||
package webdav
|
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
|
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.
|
// compiler recommended.
|
||||||
func init() { Go_version_1_9_required_for_compilation() }
|
func init() { Go_version_1_10_required_for_compilation() }
|
||||||
|
|
Loading…
Reference in a new issue