2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-25 06:07:44 +00:00

Run goimports

This commit is contained in:
Alexander Neumann 2017-07-23 14:21:03 +02:00
parent 83d1a46526
commit 6caeff2408
158 changed files with 524 additions and 438 deletions

View File

@ -4,7 +4,7 @@ import (
"syscall"
"unsafe"
"restic/debug"
"github.com/restic/restic/internal/debug"
)
// IsProcessBackground returns true if it is running in the background or false if not

View File

@ -7,7 +7,7 @@ import (
"sync"
"syscall"
"restic/debug"
"github.com/restic/restic/internal/debug"
)
var cleanupHandlers struct {

View File

@ -7,17 +7,18 @@ import (
"io"
"os"
"path/filepath"
"restic"
"strings"
"time"
"github.com/restic/restic/internal"
"github.com/spf13/cobra"
"restic/archiver"
"restic/debug"
"restic/errors"
"restic/filter"
"restic/fs"
"github.com/restic/restic/internal/archiver"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/filter"
"github.com/restic/restic/internal/fs"
)
var cmdBackup = &cobra.Command{

View File

@ -8,10 +8,10 @@ import (
"github.com/spf13/cobra"
"restic"
"restic/backend"
"restic/errors"
"restic/repository"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/backend"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/repository"
)
var cmdCat = &cobra.Command{

View File

@ -8,9 +8,9 @@ import (
"github.com/spf13/cobra"
"restic"
"restic/checker"
"restic/errors"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/checker"
"github.com/restic/restic/internal/errors"
)
var cmdCheck = &cobra.Command{

View File

@ -11,12 +11,12 @@ import (
"github.com/spf13/cobra"
"restic"
"restic/errors"
"restic/pack"
"restic/repository"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/pack"
"github.com/restic/restic/internal/repository"
"restic/worker"
"github.com/restic/restic/internal/worker"
)
var cmdDump = &cobra.Command{

View File

@ -9,9 +9,9 @@ import (
"github.com/spf13/cobra"
"restic"
"restic/debug"
"restic/errors"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
)
var cmdFind = &cobra.Command{

View File

@ -3,10 +3,11 @@ package main
import (
"context"
"encoding/json"
"restic"
"sort"
"strings"
"github.com/restic/restic/internal"
"github.com/spf13/cobra"
)

View File

@ -2,8 +2,9 @@ package main
import (
"context"
"restic/errors"
"restic/repository"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/repository"
"github.com/spf13/cobra"
)

View File

@ -3,9 +3,10 @@ package main
import (
"context"
"fmt"
"restic"
"restic/errors"
"restic/repository"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/repository"
"github.com/spf13/cobra"
)

View File

@ -3,9 +3,10 @@ package main
import (
"context"
"fmt"
"restic"
"restic/errors"
"restic/index"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/index"
"github.com/spf13/cobra"
)

View File

@ -6,9 +6,9 @@ import (
"github.com/spf13/cobra"
"restic"
"restic/errors"
"restic/repository"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/repository"
)
var cmdLs = &cobra.Command{

View File

@ -1,8 +1,8 @@
package main
import (
"restic"
"restic/migrations"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/migrations"
"github.com/spf13/cobra"
)

View File

@ -6,15 +6,16 @@ package main
import (
"context"
"os"
"restic"
"github.com/restic/restic/internal"
"github.com/spf13/cobra"
"restic/debug"
"restic/errors"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
resticfs "restic/fs"
"restic/fuse"
resticfs "github.com/restic/restic/internal/fs"
"github.com/restic/restic/internal/fuse"
systemFuse "bazil.org/fuse"
"bazil.org/fuse/fs"

View File

@ -2,7 +2,8 @@ package main
import (
"fmt"
"restic/options"
"github.com/restic/restic/internal/options"
"github.com/spf13/cobra"
)

View File

@ -2,13 +2,14 @@ package main
import (
"fmt"
"restic"
"restic/debug"
"restic/errors"
"restic/index"
"restic/repository"
"time"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/index"
"github.com/restic/restic/internal/repository"
"github.com/spf13/cobra"
)

View File

@ -2,8 +2,9 @@ package main
import (
"context"
"restic"
"restic/index"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/index"
"github.com/spf13/cobra"
)

View File

@ -1,10 +1,10 @@
package main
import (
"restic"
"restic/debug"
"restic/errors"
"restic/filter"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/filter"
"github.com/spf13/cobra"
)

View File

@ -9,7 +9,7 @@ import (
"github.com/spf13/cobra"
"restic"
"github.com/restic/restic/internal"
)
var cmdSnapshots = &cobra.Command{

View File

@ -5,10 +5,10 @@ import (
"github.com/spf13/cobra"
"restic"
"restic/debug"
"restic/errors"
"restic/repository"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/repository"
)
var cmdTag = &cobra.Command{

View File

@ -2,7 +2,8 @@ package main
import (
"context"
"restic"
"github.com/restic/restic/internal"
"github.com/spf13/cobra"
)

View File

@ -3,8 +3,8 @@ package main
import (
"context"
"restic"
"restic/repository"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/repository"
)
// FindFilteredSnapshots yields Snapshots, either given explicitly by `snapshotIDs` or filtered from the list of all snapshots.

View File

@ -6,7 +6,7 @@ import (
"path/filepath"
"time"
"restic"
"github.com/restic/restic/internal"
)
func formatBytes(c uint64) string {

View File

@ -6,23 +6,24 @@ import (
"io"
"io/ioutil"
"os"
"restic"
"runtime"
"strings"
"syscall"
"restic/backend/b2"
"restic/backend/local"
"restic/backend/location"
"restic/backend/rest"
"restic/backend/s3"
"restic/backend/sftp"
"restic/backend/swift"
"restic/debug"
"restic/options"
"restic/repository"
"github.com/restic/restic/internal"
"restic/errors"
"github.com/restic/restic/internal/backend/b2"
"github.com/restic/restic/internal/backend/local"
"github.com/restic/restic/internal/backend/location"
"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/debug"
"github.com/restic/restic/internal/options"
"github.com/restic/restic/internal/repository"
"github.com/restic/restic/internal/errors"
"golang.org/x/crypto/ssh/terminal"
)

View File

@ -7,8 +7,9 @@ import (
"net/http"
_ "net/http/pprof"
"os"
"restic/errors"
"restic/repository"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/repository"
"github.com/pkg/profile"
)

View File

@ -12,9 +12,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"
)
const (

View File

@ -9,9 +9,9 @@ import (
"runtime"
"testing"
"restic/options"
"restic/repository"
. "restic/test"
"github.com/restic/restic/internal/options"
"github.com/restic/restic/internal/repository"
. "github.com/restic/restic/internal/test"
)
type dirEntry struct {

View File

@ -12,18 +12,19 @@ import (
"os"
"path/filepath"
"regexp"
"restic"
"strings"
"syscall"
"testing"
"time"
"restic/errors"
"github.com/restic/restic/internal"
"restic/debug"
"restic/filter"
"restic/repository"
. "restic/test"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/filter"
"github.com/restic/restic/internal/repository"
. "github.com/restic/restic/internal/test"
)
func parseIDsFromReader(t testing.TB, rd io.Reader) restic.IDs {

View File

@ -2,8 +2,9 @@ package main
import (
"path/filepath"
. "restic/test"
"testing"
. "github.com/restic/restic/internal/test"
)
func TestRestoreLocalLayout(t *testing.T) {

View File

@ -7,9 +7,9 @@ import (
"sync"
"time"
"restic"
"restic/debug"
"restic/repository"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/repository"
)
var globalLocks struct {

View File

@ -6,14 +6,15 @@ import (
"fmt"
"log"
"os"
"restic"
"restic/debug"
"restic/options"
"runtime"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/options"
"github.com/spf13/cobra"
"restic/errors"
"github.com/restic/restic/internal/errors"
)
// cmdRoot is the base command when no other command has been specified.

View File

@ -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"
)

View File

@ -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 {

View File

@ -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"
)

View File

@ -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

View File

@ -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{

View File

@ -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"
)

View File

@ -2,8 +2,9 @@ package archiver
import (
"context"
"restic"
"testing"
"github.com/restic/restic/internal"
)
// TestSnapshot creates a new snapshot of path.

View File

@ -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"
)

View File

@ -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 {

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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 {

View File

@ -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.

View File

@ -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) {

View File

@ -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.

View File

@ -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) {

View File

@ -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.

View File

@ -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 {

View File

@ -4,7 +4,8 @@ package local
import (
"os"
"restic/fs"
"github.com/restic/restic/internal/fs"
)
// set file to readonly

View File

@ -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

View File

@ -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 {

View File

@ -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

View File

@ -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 {

View File

@ -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.

View File

@ -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

View File

@ -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() {

View File

@ -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

View File

@ -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.

View File

@ -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) {

View File

@ -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 {

View File

@ -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.

View File

@ -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) {

View File

@ -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"
)

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -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"
)

View File

@ -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 {

View File

@ -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) {

View File

@ -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.

View File

@ -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) {

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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")

View File

@ -2,8 +2,9 @@ package checker
import (
"context"
"restic"
"testing"
"github.com/restic/restic/internal"
)
// TestCheckRepo runs the checker on repo.

View File

@ -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"
)

View File

@ -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)

View File

@ -7,7 +7,7 @@ import (
"encoding/json"
"fmt"
"restic/errors"
"github.com/restic/restic/internal/errors"
"golang.org/x/crypto/poly1305"
)

View File

@ -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"
)

View File

@ -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"

View File

@ -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 {

View File

@ -9,7 +9,8 @@ import (
"net/http"
"net/http/httputil"
"os"
"restic/errors"
"github.com/restic/restic/internal/errors"
)
type eofDetectRoundTripper struct {

View File

@ -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.

View File

@ -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

View File

@ -9,7 +9,7 @@ import (
"strings"
"testing"
"restic/filter"
"github.com/restic/restic/internal/filter"
)
var matchTests = []struct {

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -4,7 +4,7 @@
package fuse
import (
"restic"
"github.com/restic/restic/internal"
"golang.org/x/net/context"
)

View File

@ -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

View File

@ -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"

View File

@ -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) {

Some files were not shown because too many files have changed in this diff Show More