serve webdav: disallow on go1.8 due to dependent library changes

golang.org/x/net/webdav no longer builds with go1.8
This commit is contained in:
Nick Craig-Wood 2018-11-25 16:34:51 +00:00
parent a6c28a5faa
commit d0eb8ddc30
4 changed files with 17 additions and 2 deletions

View File

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

View File

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

View File

@ -3,7 +3,7 @@
//
// We skip tests on platforms with troublesome character mappings
//+build !windows,!darwin
//+build !windows,!darwin,go1.9
package webdav

View File

@ -0,0 +1,11 @@
// 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