Permalink
Browse files

reformat imports

  • Loading branch information...
1 parent 113ee1b commit 4396ee319aa10fc059fe40c320a2e73deef97d5f @etix committed Feb 24, 2017
View
@@ -8,17 +8,6 @@ import (
"errors"
"flag"
"fmt"
- "github.com/etix/mirrorbits/core"
- "github.com/etix/mirrorbits/database"
- "github.com/etix/mirrorbits/filesystem"
- "github.com/etix/mirrorbits/mirrors"
- "github.com/etix/mirrorbits/network"
- "github.com/etix/mirrorbits/process"
- "github.com/etix/mirrorbits/scan"
- "github.com/etix/mirrorbits/utils"
- "github.com/garyburd/redigo/redis"
- "github.com/op/go-logging"
- "gopkg.in/yaml.v2"
"io/ioutil"
"net/url"
"os"
@@ -31,6 +20,18 @@ import (
"syscall"
"text/tabwriter"
"time"
+
+ "github.com/etix/mirrorbits/core"
+ "github.com/etix/mirrorbits/database"
+ "github.com/etix/mirrorbits/filesystem"
+ "github.com/etix/mirrorbits/mirrors"
+ "github.com/etix/mirrorbits/network"
+ "github.com/etix/mirrorbits/process"
+ "github.com/etix/mirrorbits/scan"
+ "github.com/etix/mirrorbits/utils"
+ "github.com/garyburd/redigo/redis"
+ "github.com/op/go-logging"
+ "gopkg.in/yaml.v2"
)
const (
View
@@ -5,13 +5,14 @@ package config
import (
"fmt"
- "github.com/etix/mirrorbits/core"
- "github.com/op/go-logging"
- "gopkg.in/yaml.v2"
"io/ioutil"
"os"
"path/filepath"
"sync"
+
+ "github.com/etix/mirrorbits/core"
+ "github.com/op/go-logging"
+ "gopkg.in/yaml.v2"
)
var (
View
@@ -5,14 +5,15 @@ package daemon
import (
"fmt"
- "github.com/etix/mirrorbits/database"
- "github.com/etix/mirrorbits/mirrors"
- "github.com/etix/mirrorbits/utils"
"math/rand"
"sort"
"strings"
"sync"
"time"
+
+ "github.com/etix/mirrorbits/database"
+ "github.com/etix/mirrorbits/mirrors"
+ "github.com/etix/mirrorbits/utils"
)
const (
View
@@ -5,13 +5,14 @@ package daemon
import (
"fmt"
- "github.com/etix/mirrorbits/database"
- "github.com/etix/mirrorbits/mirrors"
- . "github.com/etix/mirrorbits/testing"
"reflect"
"sort"
"testing"
"time"
+
+ "github.com/etix/mirrorbits/database"
+ "github.com/etix/mirrorbits/mirrors"
+ . "github.com/etix/mirrorbits/testing"
)
func TestStart(t *testing.T) {
View
@@ -7,6 +7,14 @@ import (
"context"
"errors"
"fmt"
+ "math/rand"
+ "net"
+ "net/http"
+ "strconv"
+ "strings"
+ "sync"
+ "time"
+
"github.com/etix/mirrorbits/cli"
. "github.com/etix/mirrorbits/config"
"github.com/etix/mirrorbits/core"
@@ -16,13 +24,6 @@ import (
"github.com/etix/mirrorbits/utils"
"github.com/garyburd/redigo/redis"
"github.com/op/go-logging"
- "math/rand"
- "net"
- "net/http"
- "strconv"
- "strings"
- "sync"
- "time"
)
var (
View
@@ -4,10 +4,11 @@
package database
import (
- "github.com/garyburd/redigo/redis"
- "github.com/op/go-logging"
"sync"
"time"
+
+ "github.com/garyburd/redigo/redis"
+ "github.com/op/go-logging"
)
var (
View
@@ -6,13 +6,14 @@ package database
import (
"errors"
"fmt"
- . "github.com/etix/mirrorbits/config"
- "github.com/etix/mirrorbits/core"
- "github.com/garyburd/redigo/redis"
"strconv"
"strings"
"sync"
"time"
+
+ . "github.com/etix/mirrorbits/config"
+ "github.com/etix/mirrorbits/core"
+ "github.com/garyburd/redigo/redis"
)
const (
View
@@ -9,10 +9,11 @@ import (
"crypto/sha1"
"crypto/sha256"
"encoding/hex"
- . "github.com/etix/mirrorbits/config"
"hash"
"io"
"os"
+
+ . "github.com/etix/mirrorbits/config"
)
// Generate a human readable hash of the given file path
View
@@ -4,11 +4,12 @@
package http
import (
- . "github.com/etix/mirrorbits/config"
- "github.com/etix/mirrorbits/http/cgzip"
"io"
"net/http"
"strings"
+
+ . "github.com/etix/mirrorbits/config"
+ "github.com/etix/mirrorbits/http/cgzip"
)
type gzipResponseWriter struct {
View
@@ -6,17 +6,6 @@ package http
import (
"encoding/json"
"fmt"
- . "github.com/etix/mirrorbits/config"
- "github.com/etix/mirrorbits/core"
- "github.com/etix/mirrorbits/database"
- "github.com/etix/mirrorbits/filesystem"
- "github.com/etix/mirrorbits/logs"
- "github.com/etix/mirrorbits/mirrors"
- "github.com/etix/mirrorbits/network"
- "github.com/etix/mirrorbits/utils"
- "github.com/garyburd/redigo/redis"
- "github.com/op/go-logging"
- "gopkg.in/tylerb/graceful.v1"
"html/template"
"math/rand"
"net"
@@ -28,6 +17,18 @@ import (
"strings"
"sync"
"time"
+
+ . "github.com/etix/mirrorbits/config"
+ "github.com/etix/mirrorbits/core"
+ "github.com/etix/mirrorbits/database"
+ "github.com/etix/mirrorbits/filesystem"
+ "github.com/etix/mirrorbits/logs"
+ "github.com/etix/mirrorbits/mirrors"
+ "github.com/etix/mirrorbits/network"
+ "github.com/etix/mirrorbits/utils"
+ "github.com/garyburd/redigo/redis"
+ "github.com/op/go-logging"
+ "gopkg.in/tylerb/graceful.v1"
)
var (
View
@@ -8,12 +8,13 @@ import (
"encoding/json"
"errors"
"fmt"
- . "github.com/etix/mirrorbits/config"
- "github.com/etix/mirrorbits/mirrors"
"net/http"
"sort"
"strconv"
"strings"
+
+ . "github.com/etix/mirrorbits/config"
+ "github.com/etix/mirrorbits/mirrors"
)
var (
View
@@ -4,15 +4,16 @@
package http
import (
+ "math"
+ "math/rand"
+ "sort"
+ "strings"
+
. "github.com/etix/mirrorbits/config"
"github.com/etix/mirrorbits/filesystem"
"github.com/etix/mirrorbits/mirrors"
"github.com/etix/mirrorbits/network"
"github.com/etix/mirrorbits/utils"
- "math"
- "math/rand"
- "sort"
- "strings"
)
type MirrorSelection interface {
View
@@ -6,12 +6,13 @@ package http
import (
"errors"
"fmt"
- "github.com/etix/mirrorbits/database"
- "github.com/etix/mirrorbits/filesystem"
- "github.com/etix/mirrorbits/mirrors"
"strings"
"sync"
"time"
+
+ "github.com/etix/mirrorbits/database"
+ "github.com/etix/mirrorbits/filesystem"
+ "github.com/etix/mirrorbits/mirrors"
)
/*
View
@@ -6,10 +6,6 @@ package logs
import (
"bytes"
"fmt"
- . "github.com/etix/mirrorbits/config"
- "github.com/etix/mirrorbits/core"
- "github.com/etix/mirrorbits/mirrors"
- "github.com/op/go-logging"
"io"
stdlog "log"
"os"
@@ -18,6 +14,11 @@ import (
"strings"
"sync"
"time"
+
+ . "github.com/etix/mirrorbits/config"
+ "github.com/etix/mirrorbits/core"
+ "github.com/etix/mirrorbits/mirrors"
+ "github.com/op/go-logging"
)
var (
View
@@ -6,16 +6,17 @@ package logs
import (
"bytes"
"errors"
- "github.com/etix/mirrorbits/core"
- "github.com/etix/mirrorbits/filesystem"
- "github.com/etix/mirrorbits/mirrors"
- "github.com/etix/mirrorbits/network"
- "github.com/op/go-logging"
"io/ioutil"
"os"
"reflect"
"strings"
"testing"
+
+ "github.com/etix/mirrorbits/core"
+ "github.com/etix/mirrorbits/filesystem"
+ "github.com/etix/mirrorbits/mirrors"
+ "github.com/etix/mirrorbits/network"
+ "github.com/op/go-logging"
)
type CloseTester struct {
View
15 main.go
@@ -5,6 +5,14 @@ package main
import (
"fmt"
+ "os"
+ "os/signal"
+ "runtime"
+ "runtime/pprof"
+ "strings"
+ "syscall"
+ "time"
+
"github.com/etix/mirrorbits/cli"
. "github.com/etix/mirrorbits/config"
"github.com/etix/mirrorbits/core"
@@ -15,13 +23,6 @@ import (
"github.com/etix/mirrorbits/mirrors"
"github.com/etix/mirrorbits/process"
"github.com/op/go-logging"
- "os"
- "os/signal"
- "runtime"
- "runtime/pprof"
- "strings"
- "syscall"
- "time"
)
var (
View
@@ -5,15 +5,16 @@ package mirrors
import (
"fmt"
+ "strconv"
+ "strings"
+ "time"
+ "unsafe"
+
"github.com/etix/mirrorbits/database"
"github.com/etix/mirrorbits/filesystem"
"github.com/etix/mirrorbits/network"
"github.com/etix/mirrorbits/utils"
"github.com/garyburd/redigo/redis"
- "strconv"
- "strings"
- "time"
- "unsafe"
)
// Cache implements a local caching mechanism of type LRU for content available in the
View
@@ -5,18 +5,19 @@ package mirrors
import (
"fmt"
- "github.com/etix/geoip"
- "github.com/etix/mirrorbits/filesystem"
- "github.com/etix/mirrorbits/network"
- . "github.com/etix/mirrorbits/testing"
- "github.com/garyburd/redigo/redis"
- _ "github.com/rafaeljusto/redigomock"
"reflect"
"strconv"
"strings"
"testing"
"time"
"unsafe"
+
+ "github.com/etix/geoip"
+ "github.com/etix/mirrorbits/filesystem"
+ "github.com/etix/mirrorbits/network"
+ . "github.com/etix/mirrorbits/testing"
+ "github.com/garyburd/redigo/redis"
+ _ "github.com/rafaeljusto/redigomock"
)
func TestNewCache(t *testing.T) {
Oops, something went wrong.

0 comments on commit 4396ee3

Please sign in to comment.