forked from TrueCloudLab/rclone
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:
parent
a6c28a5faa
commit
d0eb8ddc30
4 changed files with 17 additions and 2 deletions
|
@ -13,7 +13,9 @@ import (
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Command.AddCommand(http.Command)
|
Command.AddCommand(http.Command)
|
||||||
Command.AddCommand(webdav.Command)
|
if webdav.Command != nil {
|
||||||
|
Command.AddCommand(webdav.Command)
|
||||||
|
}
|
||||||
Command.AddCommand(restic.Command)
|
Command.AddCommand(restic.Command)
|
||||||
if ftp.Command != nil {
|
if ftp.Command != nil {
|
||||||
Command.AddCommand(ftp.Command)
|
Command.AddCommand(ftp.Command)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
//+build go1.9
|
||||||
|
|
||||||
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
|
//+build !windows,!darwin,go1.9
|
||||||
|
|
||||||
package webdav
|
package webdav
|
||||||
|
|
||||||
|
|
11
cmd/serve/webdav/webdav_unsupported.go
Normal file
11
cmd/serve/webdav/webdav_unsupported.go
Normal 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
|
Loading…
Add table
Reference in a new issue