mirror of
https://github.com/restic/restic.git
synced 2025-08-12 11:27:46 +00:00
Run goimports
This commit is contained in:
@@ -3,11 +3,12 @@ package archiver
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"restic"
|
||||
"restic/debug"
|
||||
"time"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/restic/chunker"
|
||||
)
|
||||
|
@@ -6,10 +6,11 @@ import (
|
||||
"errors"
|
||||
"io"
|
||||
"math/rand"
|
||||
"restic"
|
||||
"restic/checker"
|
||||
"restic/repository"
|
||||
"testing"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/checker"
|
||||
"github.com/restic/restic/internal/repository"
|
||||
)
|
||||
|
||||
func loadBlob(t *testing.T, repo restic.Repository, id restic.ID, buf []byte) int {
|
||||
|
@@ -7,17 +7,18 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"restic"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"restic/errors"
|
||||
"restic/walk"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"restic/debug"
|
||||
"restic/fs"
|
||||
"restic/pipe"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/walk"
|
||||
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/fs"
|
||||
"github.com/restic/restic/internal/pipe"
|
||||
|
||||
"github.com/restic/chunker"
|
||||
)
|
||||
|
@@ -9,12 +9,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"restic"
|
||||
"restic/archiver"
|
||||
"restic/mock"
|
||||
"restic/repository"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/archiver"
|
||||
"github.com/restic/restic/internal/mock"
|
||||
"github.com/restic/restic/internal/repository"
|
||||
)
|
||||
|
||||
const parallelSaves = 50
|
||||
|
@@ -5,8 +5,8 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"restic/pipe"
|
||||
"restic/walk"
|
||||
"github.com/restic/restic/internal/pipe"
|
||||
"github.com/restic/restic/internal/walk"
|
||||
)
|
||||
|
||||
var treeJobs = []string{
|
||||
|
@@ -7,14 +7,14 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"restic"
|
||||
"restic/archiver"
|
||||
"restic/checker"
|
||||
"restic/crypto"
|
||||
"restic/repository"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/archiver"
|
||||
"github.com/restic/restic/internal/checker"
|
||||
"github.com/restic/restic/internal/crypto"
|
||||
"github.com/restic/restic/internal/repository"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/restic/chunker"
|
||||
)
|
||||
|
@@ -2,8 +2,9 @@ package archiver
|
||||
|
||||
import (
|
||||
"context"
|
||||
"restic"
|
||||
"testing"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
)
|
||||
|
||||
// TestSnapshot creates a new snapshot of path.
|
||||
|
@@ -4,12 +4,13 @@ import (
|
||||
"context"
|
||||
"io"
|
||||
"path"
|
||||
"restic"
|
||||
"strings"
|
||||
|
||||
"restic/backend"
|
||||
"restic/debug"
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"github.com/restic/restic/internal/backend"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/kurin/blazer/b2"
|
||||
)
|
||||
|
@@ -7,11 +7,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"restic"
|
||||
"restic/backend/b2"
|
||||
"restic/backend/test"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/backend/b2"
|
||||
"github.com/restic/restic/internal/backend/test"
|
||||
|
||||
. "restic/test"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func newB2TestSuite(t testing.TB) *test.Suite {
|
||||
|
@@ -5,8 +5,8 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"restic/errors"
|
||||
"restic/options"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/options"
|
||||
)
|
||||
|
||||
// Config contains all configuration necessary to connect to an b2 compatible
|
||||
|
@@ -3,8 +3,9 @@ package backend
|
||||
import (
|
||||
"net"
|
||||
"net/http"
|
||||
"restic/debug"
|
||||
"time"
|
||||
|
||||
"github.com/restic/restic/internal/debug"
|
||||
)
|
||||
|
||||
// Transport returns a new http.RoundTripper with default settings applied.
|
||||
|
@@ -5,10 +5,11 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"restic"
|
||||
"restic/debug"
|
||||
"restic/errors"
|
||||
"restic/fs"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/fs"
|
||||
)
|
||||
|
||||
// Layout computes paths for file name storage.
|
||||
|
@@ -2,7 +2,8 @@ package backend
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"restic"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
)
|
||||
|
||||
// DefaultLayout implements the default layout for local and sftp backends, as
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package backend
|
||||
|
||||
import "restic"
|
||||
import "github.com/restic/restic/internal"
|
||||
|
||||
// RESTLayout implements the default layout for the REST protocol.
|
||||
type RESTLayout struct {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package backend
|
||||
|
||||
import "restic"
|
||||
import "github.com/restic/restic/internal"
|
||||
|
||||
// S3LegacyLayout implements the old layout used for s3 cloud storage backends, as
|
||||
// described in the Design document.
|
||||
|
@@ -5,10 +5,11 @@ import (
|
||||
"path"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"restic"
|
||||
. "restic/test"
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func TestDefaultLayout(t *testing.T) {
|
||||
|
@@ -3,8 +3,8 @@ package local
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"restic/errors"
|
||||
"restic/options"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/options"
|
||||
)
|
||||
|
||||
// Config holds all information needed to open a local repository.
|
||||
|
@@ -3,9 +3,10 @@ package local
|
||||
import (
|
||||
"context"
|
||||
"path/filepath"
|
||||
"restic"
|
||||
. "restic/test"
|
||||
"testing"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func TestLayout(t *testing.T) {
|
||||
|
@@ -5,13 +5,14 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"restic"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"restic/backend"
|
||||
"restic/debug"
|
||||
"restic/fs"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/restic/restic/internal/backend"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/fs"
|
||||
)
|
||||
|
||||
// Local is a backend in a local directory.
|
||||
|
@@ -2,12 +2,13 @@ package local_test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"restic"
|
||||
"testing"
|
||||
|
||||
"restic/backend/local"
|
||||
"restic/backend/test"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"github.com/restic/restic/internal/backend/local"
|
||||
"github.com/restic/restic/internal/backend/test"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func newTestSuite(t testing.TB) *test.Suite {
|
||||
|
@@ -4,7 +4,8 @@ package local
|
||||
|
||||
import (
|
||||
"os"
|
||||
"restic/fs"
|
||||
|
||||
"github.com/restic/restic/internal/fs"
|
||||
)
|
||||
|
||||
// set file to readonly
|
||||
|
@@ -4,13 +4,13 @@ package location
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"restic/backend/b2"
|
||||
"restic/backend/local"
|
||||
"restic/backend/rest"
|
||||
"restic/backend/s3"
|
||||
"restic/backend/sftp"
|
||||
"restic/backend/swift"
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/backend/b2"
|
||||
"github.com/restic/restic/internal/backend/local"
|
||||
"github.com/restic/restic/internal/backend/rest"
|
||||
"github.com/restic/restic/internal/backend/s3"
|
||||
"github.com/restic/restic/internal/backend/sftp"
|
||||
"github.com/restic/restic/internal/backend/swift"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// Location specifies the location of a repository, including the method of
|
||||
|
@@ -5,12 +5,12 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"restic/backend/b2"
|
||||
"restic/backend/local"
|
||||
"restic/backend/rest"
|
||||
"restic/backend/s3"
|
||||
"restic/backend/sftp"
|
||||
"restic/backend/swift"
|
||||
"github.com/restic/restic/internal/backend/b2"
|
||||
"github.com/restic/restic/internal/backend/local"
|
||||
"github.com/restic/restic/internal/backend/rest"
|
||||
"github.com/restic/restic/internal/backend/s3"
|
||||
"github.com/restic/restic/internal/backend/sftp"
|
||||
"github.com/restic/restic/internal/backend/swift"
|
||||
)
|
||||
|
||||
func parseURL(s string) *url.URL {
|
||||
|
@@ -5,12 +5,13 @@ import (
|
||||
"context"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"restic"
|
||||
"sync"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"restic/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/restic/restic/internal/debug"
|
||||
)
|
||||
|
||||
type memMap map[restic.Handle][]byte
|
||||
|
@@ -2,13 +2,14 @@ package mem_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"restic"
|
||||
"testing"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"restic/backend/mem"
|
||||
"restic/backend/test"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/restic/restic/internal/backend/mem"
|
||||
"github.com/restic/restic/internal/backend/test"
|
||||
)
|
||||
|
||||
type memConfig struct {
|
||||
|
@@ -4,8 +4,8 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"restic/errors"
|
||||
"restic/options"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/options"
|
||||
)
|
||||
|
||||
// Config contains all configuration necessary to connect to a REST server.
|
||||
|
@@ -9,15 +9,16 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"restic"
|
||||
"strings"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"golang.org/x/net/context/ctxhttp"
|
||||
|
||||
"restic/debug"
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"restic/backend"
|
||||
"github.com/restic/restic/internal/backend"
|
||||
)
|
||||
|
||||
// make sure the rest backend implements restic.Backend
|
||||
|
@@ -7,13 +7,14 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
"os/exec"
|
||||
"restic"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"restic/backend/rest"
|
||||
"restic/backend/test"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"github.com/restic/restic/internal/backend/rest"
|
||||
"github.com/restic/restic/internal/backend/test"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func runRESTServer(ctx context.Context, t testing.TB, dir string) func() {
|
||||
|
@@ -5,8 +5,8 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"restic/errors"
|
||||
"restic/options"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/options"
|
||||
)
|
||||
|
||||
// Config contains all configuration necessary to connect to an s3 compatible
|
||||
|
@@ -7,17 +7,18 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"restic"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"restic/backend"
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"github.com/restic/restic/internal/backend"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/minio/minio-go"
|
||||
"github.com/minio/minio-go/pkg/credentials"
|
||||
|
||||
"restic/debug"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
)
|
||||
|
||||
// Backend stores data on an S3 endpoint.
|
||||
|
@@ -11,13 +11,14 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"restic"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"restic/backend/s3"
|
||||
"restic/backend/test"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"github.com/restic/restic/internal/backend/s3"
|
||||
"github.com/restic/restic/internal/backend/test"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func mkdir(t testing.TB, dir string) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package backend
|
||||
|
||||
import "restic/errors"
|
||||
import "github.com/restic/restic/internal/errors"
|
||||
|
||||
// Semaphore limits access to a restricted resource.
|
||||
type Semaphore struct {
|
||||
|
@@ -5,8 +5,8 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"restic/errors"
|
||||
"restic/options"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/options"
|
||||
)
|
||||
|
||||
// Config collects all information required to connect to an sftp server.
|
||||
|
@@ -4,10 +4,11 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"restic"
|
||||
"restic/backend/sftp"
|
||||
. "restic/test"
|
||||
"testing"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/backend/sftp"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func TestLayout(t *testing.T) {
|
||||
|
@@ -8,14 +8,15 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"restic"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"restic/backend"
|
||||
"restic/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/restic/restic/internal/backend"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
|
||||
"github.com/pkg/sftp"
|
||||
)
|
||||
|
@@ -5,14 +5,15 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"restic"
|
||||
"restic/backend/sftp"
|
||||
"restic/backend/test"
|
||||
"restic/errors"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/backend/sftp"
|
||||
"github.com/restic/restic/internal/backend/test"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func findSFTPServerBinary() string {
|
||||
|
@@ -1,8 +1,9 @@
|
||||
package sftp
|
||||
|
||||
import (
|
||||
"restic/errors"
|
||||
"unicode"
|
||||
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// shellSplitter splits a command string into separater arguments. It supports
|
||||
|
@@ -2,9 +2,10 @@ package swift
|
||||
|
||||
import (
|
||||
"os"
|
||||
"restic/errors"
|
||||
"restic/options"
|
||||
"strings"
|
||||
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/options"
|
||||
)
|
||||
|
||||
// Config contains basic configuration needed to specify swift location for a swift server
|
||||
|
@@ -7,13 +7,14 @@ import (
|
||||
"net/http"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"restic"
|
||||
"restic/backend"
|
||||
"restic/debug"
|
||||
"restic/errors"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/backend"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/ncw/swift"
|
||||
)
|
||||
|
||||
|
@@ -4,15 +4,16 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"restic"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"restic/errors"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"restic/backend/swift"
|
||||
"restic/backend/test"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
|
||||
"github.com/restic/restic/internal/backend/swift"
|
||||
"github.com/restic/restic/internal/backend/test"
|
||||
)
|
||||
|
||||
func newSwiftTestSuite(t testing.TB) *test.Suite {
|
||||
|
@@ -4,9 +4,10 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"restic"
|
||||
"restic/test"
|
||||
"testing"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func saveRandomFile(t testing.TB, be restic.Backend, length int) ([]byte, restic.Handle) {
|
||||
|
@@ -2,11 +2,12 @@ package test
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"restic"
|
||||
"restic/test"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
// Suite implements a test suite for restic backends.
|
||||
|
@@ -9,16 +9,17 @@ import (
|
||||
"math/rand"
|
||||
"os"
|
||||
"reflect"
|
||||
"restic"
|
||||
"restic/errors"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"restic/backend"
|
||||
"github.com/restic/restic/internal/test"
|
||||
|
||||
"github.com/restic/restic/internal/backend"
|
||||
)
|
||||
|
||||
func seedRand(t testing.TB) {
|
||||
|
@@ -2,12 +2,13 @@ package test_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"restic"
|
||||
"restic/errors"
|
||||
"testing"
|
||||
|
||||
"restic/backend/mem"
|
||||
"restic/backend/test"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/restic/restic/internal/backend/mem"
|
||||
"github.com/restic/restic/internal/backend/test"
|
||||
)
|
||||
|
||||
//go:generate go run generate_test_list.go
|
||||
|
@@ -4,7 +4,8 @@ import (
|
||||
"context"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"restic"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
)
|
||||
|
||||
// LoadAll reads all data stored in the backend for the handle.
|
||||
|
@@ -4,12 +4,13 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"math/rand"
|
||||
"restic"
|
||||
"testing"
|
||||
|
||||
"restic/backend"
|
||||
"restic/backend/mem"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"github.com/restic/restic/internal/backend"
|
||||
"github.com/restic/restic/internal/backend/mem"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
const KiB = 1 << 10
|
||||
|
@@ -2,7 +2,8 @@ package restic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"restic/errors"
|
||||
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// ErrNoIDPrefixFound is returned by Find() when no ID for the given prefix
|
||||
|
@@ -3,7 +3,7 @@ package restic
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// Blob is one part of a file or a tree.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package restic
|
||||
|
||||
import "restic/crypto"
|
||||
import "github.com/restic/restic/internal/crypto"
|
||||
|
||||
// NewBlobBuffer returns a buffer that is large enough to hold a blob of size
|
||||
// plaintext bytes, including the crypto overhead.
|
||||
|
@@ -8,14 +8,14 @@ import (
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"restic/errors"
|
||||
"restic/fs"
|
||||
"restic/hashing"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/fs"
|
||||
"github.com/restic/restic/internal/hashing"
|
||||
|
||||
"restic"
|
||||
"restic/debug"
|
||||
"restic/pack"
|
||||
"restic/repository"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/pack"
|
||||
"github.com/restic/restic/internal/repository"
|
||||
)
|
||||
|
||||
// Checker runs various checks on a repository. It is advisable to create an
|
||||
|
@@ -8,11 +8,11 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"restic"
|
||||
"restic/archiver"
|
||||
"restic/checker"
|
||||
"restic/repository"
|
||||
"restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/archiver"
|
||||
"github.com/restic/restic/internal/checker"
|
||||
"github.com/restic/restic/internal/repository"
|
||||
"github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
var checkerTestData = filepath.Join("testdata", "checker-test-repo.tar.gz")
|
||||
|
@@ -2,8 +2,9 @@ package checker
|
||||
|
||||
import (
|
||||
"context"
|
||||
"restic"
|
||||
"testing"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
)
|
||||
|
||||
// TestCheckRepo runs the checker on repo.
|
||||
|
@@ -4,9 +4,9 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"restic/debug"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
|
||||
"github.com/restic/chunker"
|
||||
)
|
||||
|
@@ -2,10 +2,11 @@ package restic_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"restic"
|
||||
"testing"
|
||||
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
type saver func(restic.FileType, interface{}) (restic.ID, error)
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"golang.org/x/crypto/poly1305"
|
||||
)
|
||||
|
@@ -6,8 +6,8 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"restic/crypto"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal/crypto"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
|
||||
"github.com/restic/chunker"
|
||||
)
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"crypto/rand"
|
||||
"time"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
sscrypt "github.com/elithrar/simple-scrypt"
|
||||
"golang.org/x/crypto/scrypt"
|
||||
|
@@ -8,11 +8,12 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"restic/fs"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/fs"
|
||||
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
var opts struct {
|
||||
|
@@ -9,7 +9,8 @@ import (
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"os"
|
||||
"restic/errors"
|
||||
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
type eofDetectRoundTripper struct {
|
||||
|
@@ -3,7 +3,7 @@ package restic
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// FileType is the type of a file in the backend.
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// ErrBadString is returned when Match is called with the empty string as the
|
||||
|
@@ -9,7 +9,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"restic/filter"
|
||||
"github.com/restic/restic/internal/filter"
|
||||
)
|
||||
|
||||
var matchTests = []struct {
|
||||
|
@@ -8,12 +8,13 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"restic"
|
||||
"sort"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"restic/repository"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"github.com/restic/restic/internal/repository"
|
||||
)
|
||||
|
||||
func loadIDSet(t testing.TB, filename string) restic.BlobSet {
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
"os"
|
||||
"syscall"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// DeviceID extracts the device ID from an os.FileInfo object by casting it
|
||||
|
@@ -5,7 +5,7 @@ package fs
|
||||
import (
|
||||
"os"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// DeviceID extracts the device ID from an os.FileInfo object by casting it
|
||||
|
@@ -4,7 +4,7 @@
|
||||
package fuse
|
||||
|
||||
import (
|
||||
"restic"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
@@ -10,8 +10,8 @@ import (
|
||||
"bazil.org/fuse/fs"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"restic"
|
||||
"restic/debug"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
)
|
||||
|
||||
// Statically ensure that *dir implement those interface
|
||||
|
@@ -4,10 +4,10 @@
|
||||
package fuse
|
||||
|
||||
import (
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"restic"
|
||||
"restic/debug"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
|
||||
"bazil.org/fuse"
|
||||
"bazil.org/fuse/fs"
|
||||
|
@@ -11,13 +11,13 @@ import (
|
||||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"restic/repository"
|
||||
"github.com/restic/restic/internal/repository"
|
||||
|
||||
"bazil.org/fuse"
|
||||
"bazil.org/fuse/fs"
|
||||
|
||||
"restic"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func testRead(t testing.TB, f *file, offset, length int, data []byte) {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
package fuse
|
||||
|
||||
import (
|
||||
"restic"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"bazil.org/fuse"
|
||||
"bazil.org/fuse/fs"
|
||||
|
@@ -5,7 +5,8 @@ package fuse
|
||||
|
||||
import (
|
||||
"os"
|
||||
"restic/debug"
|
||||
|
||||
"github.com/restic/restic/internal/debug"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
|
@@ -4,8 +4,8 @@
|
||||
package fuse
|
||||
|
||||
import (
|
||||
"restic"
|
||||
"restic/debug"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
|
@@ -6,10 +6,11 @@ package fuse
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"restic"
|
||||
"restic/debug"
|
||||
"time"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"bazil.org/fuse"
|
||||
|
@@ -3,8 +3,8 @@ package restic_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"restic"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
// TestHardLinks contains various tests for HardlinkIndex.
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// Hash returns the ID for data.
|
||||
|
@@ -5,13 +5,14 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"restic"
|
||||
"restic/debug"
|
||||
"restic/list"
|
||||
"restic/pack"
|
||||
"restic/worker"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/list"
|
||||
"github.com/restic/restic/internal/pack"
|
||||
"github.com/restic/restic/internal/worker"
|
||||
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// Pack contains information about the contents of a pack.
|
||||
|
@@ -3,12 +3,13 @@ package index
|
||||
import (
|
||||
"context"
|
||||
"math/rand"
|
||||
"restic"
|
||||
"restic/checker"
|
||||
"restic/repository"
|
||||
"restic/test"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/checker"
|
||||
"github.com/restic/restic/internal/repository"
|
||||
"github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@@ -2,8 +2,9 @@ package list
|
||||
|
||||
import (
|
||||
"context"
|
||||
"restic"
|
||||
"restic/worker"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/worker"
|
||||
)
|
||||
|
||||
const listPackWorkers = 10
|
||||
|
@@ -11,9 +11,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"restic/debug"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
)
|
||||
|
||||
// Lock represents a process locking the repository for an operation.
|
||||
|
@@ -6,9 +6,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"restic"
|
||||
"restic/repository"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/repository"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func TestLock(t *testing.T) {
|
||||
|
@@ -8,9 +8,9 @@ import (
|
||||
"strconv"
|
||||
"syscall"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"restic/debug"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
)
|
||||
|
||||
// uidGidInt returns uid, gid of the user as a number.
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"os"
|
||||
"os/user"
|
||||
|
||||
"restic/debug"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
)
|
||||
|
||||
// uidGidInt always returns 0 on Windows, since uid isn't numbers
|
||||
|
@@ -2,7 +2,8 @@ package migrations
|
||||
|
||||
import (
|
||||
"context"
|
||||
"restic"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
)
|
||||
|
||||
// Migration implements a data migration.
|
||||
|
@@ -5,11 +5,12 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"restic"
|
||||
"restic/backend"
|
||||
"restic/backend/s3"
|
||||
"restic/debug"
|
||||
"restic/errors"
|
||||
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/backend"
|
||||
"github.com/restic/restic/internal/backend/s3"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@@ -3,9 +3,10 @@ package mock
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"restic"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// Backend implements a mock backend.
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package mock
|
||||
|
||||
import (
|
||||
"restic"
|
||||
"restic/crypto"
|
||||
"github.com/restic/restic/internal"
|
||||
"github.com/restic/restic/internal/crypto"
|
||||
)
|
||||
|
||||
// Repository implements a mock Repository.
|
||||
|
@@ -11,12 +11,13 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"bytes"
|
||||
"restic/debug"
|
||||
"restic/fs"
|
||||
"runtime"
|
||||
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/fs"
|
||||
)
|
||||
|
||||
// ExtendedAttribute is a tuple storing the xattr name and value.
|
||||
|
@@ -6,9 +6,9 @@ import (
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"restic/fs"
|
||||
"github.com/restic/restic/internal/fs"
|
||||
)
|
||||
|
||||
func (node Node) restoreSymlinkTimestamps(path string, utimes [2]syscall.Timespec) error {
|
||||
|
@@ -9,8 +9,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"restic"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func BenchmarkNodeFillUser(t *testing.B) {
|
||||
|
@@ -3,7 +3,7 @@ package restic
|
||||
import (
|
||||
"syscall"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// mknod() creates a filesystem node (file, device
|
||||
|
@@ -4,9 +4,10 @@
|
||||
package restic
|
||||
|
||||
import (
|
||||
"restic/errors"
|
||||
"syscall"
|
||||
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/pkg/xattr"
|
||||
)
|
||||
|
||||
|
@@ -2,11 +2,12 @@ package options
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"restic/errors"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// Options holds options in the form key=value.
|
||||
|
@@ -5,13 +5,14 @@ import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"io"
|
||||
"restic"
|
||||
"sync"
|
||||
|
||||
"restic/debug"
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"restic/crypto"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"github.com/restic/restic/internal/crypto"
|
||||
)
|
||||
|
||||
// Packer is used to create a new Pack.
|
||||
|
@@ -8,13 +8,14 @@ import (
|
||||
"encoding/binary"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"restic"
|
||||
"testing"
|
||||
|
||||
"restic/backend/mem"
|
||||
"restic/crypto"
|
||||
"restic/pack"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal"
|
||||
|
||||
"github.com/restic/restic/internal/backend/mem"
|
||||
"github.com/restic/restic/internal/crypto"
|
||||
"github.com/restic/restic/internal/pack"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
var testLens = []int{23, 31650, 25860, 10928, 13769, 19862, 5211, 127, 13690, 30231}
|
||||
|
@@ -7,10 +7,10 @@ import (
|
||||
"path/filepath"
|
||||
"sort"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
|
||||
"restic/debug"
|
||||
"restic/fs"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/fs"
|
||||
)
|
||||
|
||||
type Result interface{}
|
||||
|
@@ -10,9 +10,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"restic/debug"
|
||||
"restic/pipe"
|
||||
. "restic/test"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/pipe"
|
||||
. "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
type stats struct {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"restic/debug"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"restic/debug"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"io"
|
||||
"math/rand"
|
||||
|
||||
"restic/errors"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
)
|
||||
|
||||
// RandReader allows reading from a rand.Rand.
|
||||
|
@@ -3,7 +3,8 @@ package restic
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"restic/debug"
|
||||
|
||||
"github.com/restic/restic/internal/debug"
|
||||
)
|
||||
|
||||
type backendReaderAt struct {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user