mirror of
https://github.com/rclone/rclone.git
synced 2025-12-31 15:43:53 +00:00
serve restic: disallow on go1.8 because of dependent library changes
golang.org/x/net/http2 no longer builds on go1.8
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
// 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,3 +1,5 @@
|
|||||||
|
// +build go1.9
|
||||||
|
|
||||||
package restic
|
package restic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
// 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 (
|
||||||
|
|||||||
11
cmd/serve/restic/restic_unsupported.go
Normal file
11
cmd/serve/restic/restic_unsupported.go
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
// 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,3 +1,5 @@
|
|||||||
|
// +build go1.9
|
||||||
|
|
||||||
package restic
|
package restic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build !go1.10
|
//+build go1.9,!go1.10
|
||||||
|
|
||||||
// Fallback deadline setting for pre go1.10
|
// Fallback deadline setting for pre go1.10
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ func init() {
|
|||||||
if webdav.Command != nil {
|
if webdav.Command != nil {
|
||||||
Command.AddCommand(webdav.Command)
|
Command.AddCommand(webdav.Command)
|
||||||
}
|
}
|
||||||
Command.AddCommand(restic.Command)
|
if restic.Command != nil {
|
||||||
|
Command.AddCommand(restic.Command)
|
||||||
|
}
|
||||||
if ftp.Command != nil {
|
if ftp.Command != nil {
|
||||||
Command.AddCommand(ftp.Command)
|
Command.AddCommand(ftp.Command)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user