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:
Nick Craig-Wood 2018-11-26 14:07:25 +00:00
parent d0eb8ddc30
commit e56c6402a7
7 changed files with 25 additions and 2 deletions

View File

@ -1,4 +1,7 @@
// Package restic serves a remote suitable for use with restic
// +build go1.9
package restic
import (

View File

@ -1,3 +1,5 @@
// +build go1.9
package restic
import (

View File

@ -1,5 +1,8 @@
// Serve restic tests set up a server and run the integration tests
// for restic against it.
// +build go1.9
package restic
import (

View 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

View File

@ -1,3 +1,5 @@
// +build go1.9
package restic
import (

View File

@ -1,4 +1,4 @@
//+build !go1.10
//+build go1.9,!go1.10
// Fallback deadline setting for pre go1.10

View File

@ -16,7 +16,9 @@ func init() {
if webdav.Command != nil {
Command.AddCommand(webdav.Command)
}
Command.AddCommand(restic.Command)
if restic.Command != nil {
Command.AddCommand(restic.Command)
}
if ftp.Command != nil {
Command.AddCommand(ftp.Command)
}