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,13 +4,14 @@ import (
"context"
"encoding/json"
"io"
"restic"
"sync"
"time"
"restic/errors"
"github.com/restic/restic/internal"
"restic/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/debug"
)
// Index holds a lookup table for id -> pack.

View File

@@ -2,11 +2,12 @@ package repository_test
import (
"bytes"
"restic"
"testing"
"restic/repository"
. "restic/test"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/repository"
. "github.com/restic/restic/internal/test"
)
func TestIndexSerialize(t *testing.T) {

View File

@@ -7,14 +7,15 @@ import (
"fmt"
"os"
"os/user"
"restic"
"time"
"restic/errors"
"github.com/restic/restic/internal"
"restic/backend"
"restic/crypto"
"restic/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/backend"
"github.com/restic/restic/internal/crypto"
"github.com/restic/restic/internal/debug"
)
var (

View File

@@ -2,12 +2,13 @@ package repository
import (
"context"
"restic"
"sync"
"restic/errors"
"github.com/restic/restic/internal"
"restic/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/debug"
)
// MasterIndex is a collection of indexes and IDs of chunks that are in the process of being saved.

View File

@@ -5,16 +5,17 @@ import (
"crypto/sha256"
"io"
"os"
"restic"
"sync"
"restic/errors"
"restic/hashing"
"github.com/restic/restic/internal"
"restic/crypto"
"restic/debug"
"restic/fs"
"restic/pack"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/hashing"
"github.com/restic/restic/internal/crypto"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/fs"
"github.com/restic/restic/internal/pack"
)
// Saver implements saving data in a backend.

View File

@@ -5,12 +5,13 @@ import (
"io"
"math/rand"
"os"
"restic"
"restic/backend/mem"
"restic/crypto"
"restic/fs"
"restic/mock"
"testing"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/backend/mem"
"github.com/restic/restic/internal/crypto"
"github.com/restic/restic/internal/fs"
"github.com/restic/restic/internal/mock"
)
type randReader struct {

View File

@@ -2,10 +2,11 @@ package repository
import (
"context"
"restic"
"sync"
"restic/debug"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/debug"
)
// ParallelWorkFunc gets one file ID to work on. If an error is returned,

View File

@@ -3,14 +3,15 @@ package repository_test
import (
"context"
"math/rand"
"restic"
"testing"
"time"
"restic/errors"
"github.com/restic/restic/internal"
"restic/repository"
. "restic/test"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/repository"
. "github.com/restic/restic/internal/test"
)
type testIDs []string

View File

@@ -4,13 +4,14 @@ import (
"context"
"crypto/sha256"
"io"
"restic"
"restic/debug"
"restic/fs"
"restic/hashing"
"restic/pack"
"restic/errors"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/fs"
"github.com/restic/restic/internal/hashing"
"github.com/restic/restic/internal/pack"
"github.com/restic/restic/internal/errors"
)
// Repack takes a list of packs together with a list of blobs contained in

View File

@@ -4,10 +4,11 @@ import (
"context"
"io"
"math/rand"
"restic"
"restic/index"
"restic/repository"
"testing"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/index"
"github.com/restic/restic/internal/repository"
)
func randomSize(min, max int) int {

View File

@@ -6,14 +6,15 @@ import (
"encoding/json"
"fmt"
"os"
"restic"
"restic/errors"
"github.com/restic/restic/internal"
"restic/backend"
"restic/crypto"
"restic/debug"
"restic/pack"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/backend"
"github.com/restic/restic/internal/crypto"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/pack"
)
// Repository is used to access a repository in a backend.

View File

@@ -10,10 +10,10 @@ import (
"testing"
"time"
"restic"
"restic/archiver"
"restic/repository"
. "restic/test"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/archiver"
"github.com/restic/restic/internal/repository"
. "github.com/restic/restic/internal/test"
)
var testSizes = []int{5, 23, 2<<18 + 23, 1 << 20}

View File

@@ -3,13 +3,14 @@ package repository
import (
"context"
"os"
"restic"
"restic/backend/local"
"restic/backend/mem"
"restic/crypto"
"restic/test"
"testing"
"github.com/restic/restic/internal"
"github.com/restic/restic/internal/backend/local"
"github.com/restic/restic/internal/backend/mem"
"github.com/restic/restic/internal/crypto"
"github.com/restic/restic/internal/test"
"github.com/restic/chunker"
)