Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

serve restic: disable for go1.16 and earlier after update

Nick Craig-Wood3661791e8260
diff --git a/cmd/serve/restic/cache.go b/cmd/serve/restic/cache.go
index f7f376c82..407823581 100644
--- a/cmd/serve/restic/cache.go
+++ b/cmd/serve/restic/cache.go
@@ -1,3 +1,6 @@
+//go:build go1.17
+// +build go1.17
+
package restic
import (
diff --git a/cmd/serve/restic/cache_test.go b/cmd/serve/restic/cache_test.go
index 05687ad84..290768aba 100644
--- a/cmd/serve/restic/cache_test.go
+++ b/cmd/serve/restic/cache_test.go
@@ -1,3 +1,6 @@
+//go:build go1.17
+// +build go1.17
+
package restic
import (
diff --git a/cmd/serve/restic/restic.go b/cmd/serve/restic/restic.go
index 53143957f..b1ac10393 100644
--- a/cmd/serve/restic/restic.go
+++ b/cmd/serve/restic/restic.go
@@ -1,4 +1,8 @@
// Package restic serves a remote suitable for use with restic
+
+//go:build go1.17
+// +build go1.17
+
package restic
import (
diff --git a/cmd/serve/restic/restic_appendonly_test.go b/cmd/serve/restic/restic_appendonly_test.go
index ccddf289b..f2090b2e4 100644
--- a/cmd/serve/restic/restic_appendonly_test.go
+++ b/cmd/serve/restic/restic_appendonly_test.go
@@ -1,3 +1,6 @@
+//go:build go1.17
+// +build go1.17
+
package restic
import (
diff --git a/cmd/serve/restic/restic_privaterepos_test.go b/cmd/serve/restic/restic_privaterepos_test.go
index 4feeb3d8a..7fd2a5c6b 100644
--- a/cmd/serve/restic/restic_privaterepos_test.go
+++ b/cmd/serve/restic/restic_privaterepos_test.go
@@ -1,3 +1,6 @@
+//go:build go1.17
+// +build go1.17
+
package restic
import (
diff --git a/cmd/serve/restic/restic_test.go b/cmd/serve/restic/restic_test.go
index d9f343ca5..8e8cccf67 100644
--- a/cmd/serve/restic/restic_test.go
+++ b/cmd/serve/restic/restic_test.go
@@ -1,6 +1,9 @@
// Serve restic tests set up a server and run the integration tests
// for restic against it.
+//go:build go1.17
+// +build go1.17
+
package restic
import (
diff --git a/cmd/serve/restic/restic_unsupported.go b/cmd/serve/restic/restic_unsupported.go
new file mode 100644
index 000000000..a270482a3
--- /dev/null
+++ b/cmd/serve/restic/restic_unsupported.go
@@ -0,0 +1,14 @@
+// Build for restic for unsupported platforms to stop go complaining
+// about "no buildable Go source files "
+
+//go:build !go1.17
+// +build !go1.17
+
+package restic
+
+import (
+ "github.com/spf13/cobra"
+)
+
+// Command definition for cobra
+var Command *cobra.Command
diff --git a/cmd/serve/restic/restic_utils_test.go b/cmd/serve/restic/restic_utils_test.go
index 0721f7c0f..17bbfa2d9 100644
--- a/cmd/serve/restic/restic_utils_test.go
+++ b/cmd/serve/restic/restic_utils_test.go
@@ -1,3 +1,6 @@
+//go:build go1.17
+// +build go1.17
+
package restic
import (
diff --git a/cmd/serve/restic/stdio_conn.go b/cmd/serve/restic/stdio_conn.go
index 3b411eb0e..3e5160bad 100644
--- a/cmd/serve/restic/stdio_conn.go
+++ b/cmd/serve/restic/stdio_conn.go
@@ -1,3 +1,6 @@
+//go:build go1.17
+// +build go1.17
+
package restic
import (