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.