Separate storj.io packages in imports (#481)
Format with goimports -w -local storj.io Add flag to golang lint Remove commented out imports as they mess with goimports
This commit is contained in:
parent
2b2e0996b0
commit
2dbada73ab
@ -65,6 +65,8 @@ linters-settings:
|
||||
# 2. you use go >= 1.10
|
||||
# 3. you do repeated runs (false for CI) or cache $GOPATH/pkg or `go env GOCACHE` dir in CI.
|
||||
use-installed-packages: false
|
||||
goimports:
|
||||
local: "storj.io"
|
||||
golint:
|
||||
min-confidence: 0.8
|
||||
gofmt:
|
||||
|
@ -15,6 +15,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
monkit "gopkg.in/spacemonkeygo/monkit.v2"
|
||||
|
||||
"storj.io/storj/internal/memory"
|
||||
"storj.io/storj/pkg/process"
|
||||
)
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
"github.com/alicebob/miniredis"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alicebob/miniredis"
|
||||
"storj.io/storj/pkg/auth/grpcauth"
|
||||
"storj.io/storj/pkg/cfgstruct"
|
||||
"storj.io/storj/pkg/datarepair/checker"
|
||||
|
@ -9,11 +9,9 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"storj.io/storj/pkg/cfgstruct"
|
||||
|
||||
// "storj.io/storj/pkg/datarepair/repairer"
|
||||
// "storj.io/storj/pkg/datarepair/checker"
|
||||
"storj.io/storj/pkg/auth/grpcauth"
|
||||
"storj.io/storj/pkg/cfgstruct"
|
||||
"storj.io/storj/pkg/kademlia"
|
||||
"storj.io/storj/pkg/overlay"
|
||||
mockOverlay "storj.io/storj/pkg/overlay/mocks"
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"storj.io/storj/pkg/cfgstruct"
|
||||
"storj.io/storj/pkg/provider"
|
||||
)
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
time "time"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
|
||||
dht "storj.io/storj/pkg/dht"
|
||||
"storj.io/storj/pkg/pb"
|
||||
)
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"storj.io/storj/pkg/pb"
|
||||
)
|
||||
|
||||
|
@ -12,6 +12,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/zeebo/errs"
|
||||
|
||||
"storj.io/storj/pkg/dht"
|
||||
"storj.io/storj/pkg/node"
|
||||
"storj.io/storj/pkg/pb"
|
||||
|
@ -13,9 +13,9 @@ import (
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"storj.io/storj/pkg/dht/mocks"
|
||||
"storj.io/storj/pkg/node"
|
||||
|
||||
"storj.io/storj/pkg/pb"
|
||||
"storj.io/storj/pkg/provider"
|
||||
)
|
||||
|
@ -13,9 +13,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"storj.io/storj/pkg/storage/meta"
|
||||
"storj.io/storj/storage"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
minio "github.com/minio/minio/cmd"
|
||||
"github.com/minio/minio/pkg/hash"
|
||||
@ -25,7 +22,9 @@ import (
|
||||
"storj.io/storj/pkg/ranger"
|
||||
"storj.io/storj/pkg/storage/buckets"
|
||||
mock_buckets "storj.io/storj/pkg/storage/buckets/mocks"
|
||||
"storj.io/storj/pkg/storage/meta"
|
||||
"storj.io/storj/pkg/storage/objects"
|
||||
"storj.io/storj/storage"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -5,8 +5,9 @@
|
||||
package logging
|
||||
|
||||
import (
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
)
|
||||
|
||||
// MockErrorLogger is a mock of ErrorLogger interface
|
||||
|
@ -11,13 +11,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/minio/minio/pkg/madmin"
|
||||
policy "github.com/minio/minio/pkg/policy"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
minio "github.com/minio/minio/cmd"
|
||||
"github.com/minio/minio/pkg/auth"
|
||||
"github.com/minio/minio/pkg/hash"
|
||||
"github.com/minio/minio/pkg/madmin"
|
||||
policy "github.com/minio/minio/pkg/policy"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/zeebo/errs"
|
||||
|
||||
"storj.io/storj/pkg/kademlia"
|
||||
)
|
||||
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
|
||||
dht "storj.io/storj/pkg/dht"
|
||||
x "storj.io/storj/pkg/overlay"
|
||||
pb "storj.io/storj/pkg/pb"
|
||||
|
@ -10,12 +10,11 @@ import (
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"github.com/zeebo/errs"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"gopkg.in/spacemonkeygo/monkit.v2"
|
||||
"storj.io/storj/pkg/dht"
|
||||
|
||||
"storj.io/storj/pkg/dht"
|
||||
"storj.io/storj/pkg/pb"
|
||||
"storj.io/storj/storage"
|
||||
)
|
||||
|
@ -13,13 +13,12 @@ import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/gtank/cryptopasta"
|
||||
"github.com/zeebo/errs"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/gtank/cryptopasta"
|
||||
|
||||
"storj.io/storj/pkg/pb"
|
||||
"storj.io/storj/pkg/ranger"
|
||||
)
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
|
||||
"github.com/mr-tron/base58/base58"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"storj.io/storj/pkg/dht"
|
||||
"storj.io/storj/pkg/node"
|
||||
"storj.io/storj/pkg/provider"
|
||||
|
@ -15,7 +15,6 @@ import (
|
||||
"time"
|
||||
|
||||
_ "github.com/mattn/go-sqlite3" // register sqlite to sql
|
||||
|
||||
"go.uber.org/zap"
|
||||
monkit "gopkg.in/spacemonkeygo/monkit.v2"
|
||||
|
||||
|
@ -14,9 +14,9 @@ import (
|
||||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"storj.io/storj/pkg/pb"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"storj.io/storj/pkg/pb"
|
||||
)
|
||||
|
||||
var ctx = context.Background()
|
||||
|
@ -5,6 +5,7 @@ package server
|
||||
|
||||
import (
|
||||
"github.com/gogo/protobuf/proto"
|
||||
|
||||
"storj.io/storj/pkg/pb"
|
||||
"storj.io/storj/pkg/utils"
|
||||
)
|
||||
|
@ -19,6 +19,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/net/context"
|
||||
monkit "gopkg.in/spacemonkeygo/monkit.v2"
|
||||
|
||||
"storj.io/storj/pkg/pb"
|
||||
"storj.io/storj/pkg/peertls"
|
||||
pstore "storj.io/storj/pkg/piecestore"
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/zeebo/errs"
|
||||
|
||||
"storj.io/storj/pkg/pb"
|
||||
pstore "storj.io/storj/pkg/piecestore"
|
||||
"storj.io/storj/pkg/utils"
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
|
||||
paths "storj.io/storj/pkg/paths"
|
||||
"storj.io/storj/pkg/pb"
|
||||
"storj.io/storj/pkg/pointerdb/pdbclient"
|
||||
|
@ -13,6 +13,7 @@ import (
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
grpc "google.golang.org/grpc"
|
||||
|
||||
"storj.io/storj/pkg/pb"
|
||||
)
|
||||
|
||||
|
@ -9,14 +9,13 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
"storj.io/storj/pkg/auth"
|
||||
"storj.io/storj/pkg/paths"
|
||||
|
@ -8,7 +8,10 @@ import (
|
||||
"crypto"
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"math/bits"
|
||||
"net"
|
||||
"os"
|
||||
|
||||
@ -18,10 +21,6 @@ import (
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/peer"
|
||||
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"math/bits"
|
||||
|
||||
"storj.io/storj/pkg/peertls"
|
||||
"storj.io/storj/pkg/utils"
|
||||
)
|
||||
|
@ -6,11 +6,10 @@ package ranger
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"net/http/httptest"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -10,7 +10,6 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
@ -9,9 +9,8 @@ import (
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.uber.org/zap"
|
||||
|
||||
dbx "storj.io/storj/pkg/statdb/dbx"
|
||||
pb "storj.io/storj/pkg/statdb/proto"
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
|
||||
buckets "storj.io/storj/pkg/storage/buckets"
|
||||
objects "storj.io/storj/pkg/storage/objects"
|
||||
)
|
||||
|
@ -10,7 +10,6 @@ import (
|
||||
|
||||
minio "github.com/minio/minio/cmd"
|
||||
"github.com/zeebo/errs"
|
||||
|
||||
monkit "gopkg.in/spacemonkeygo/monkit.v2"
|
||||
|
||||
"storj.io/storj/pkg/paths"
|
||||
|
@ -11,13 +11,15 @@ package ecclient
|
||||
|
||||
import (
|
||||
context "context"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
time "time"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
|
||||
pb "storj.io/storj/pkg/pb"
|
||||
client "storj.io/storj/pkg/piecestore/rpc/client"
|
||||
ranger "storj.io/storj/pkg/ranger"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// MockPSClient is a mock of PSClient interface
|
||||
|
@ -13,6 +13,7 @@ import (
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
grpc "google.golang.org/grpc"
|
||||
|
||||
"storj.io/storj/pkg/pb"
|
||||
)
|
||||
|
||||
|
@ -10,7 +10,6 @@ import (
|
||||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"github.com/zeebo/errs"
|
||||
|
||||
"go.uber.org/zap"
|
||||
monkit "gopkg.in/spacemonkeygo/monkit.v2"
|
||||
|
||||
|
@ -11,6 +11,7 @@ import (
|
||||
time "time"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
|
||||
paths "storj.io/storj/pkg/paths"
|
||||
ranger "storj.io/storj/pkg/ranger"
|
||||
)
|
||||
|
@ -9,10 +9,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"storj.io/storj/pkg/eestream"
|
||||
mock_eestream "storj.io/storj/pkg/eestream/mocks"
|
||||
mock_overlay "storj.io/storj/pkg/overlay/mocks"
|
||||
|
@ -14,6 +14,7 @@ import (
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"storj.io/storj/pkg/paths"
|
||||
"storj.io/storj/pkg/pb"
|
||||
ranger "storj.io/storj/pkg/ranger"
|
||||
|
@ -7,10 +7,10 @@ import (
|
||||
"bytes"
|
||||
"time"
|
||||
|
||||
"github.com/boltdb/bolt"
|
||||
|
||||
"storj.io/storj/pkg/utils"
|
||||
"storj.io/storj/storage"
|
||||
|
||||
"github.com/boltdb/bolt"
|
||||
)
|
||||
|
||||
// Client is the entrypoint into a bolt data store
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/alicebob/miniredis"
|
||||
"github.com/go-redis/redis"
|
||||
|
||||
"storj.io/storj/internal/processgroup"
|
||||
)
|
||||
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
|
||||
"storj.io/storj/storage"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"storj.io/storj/storage"
|
||||
)
|
||||
|
||||
var id int64
|
||||
|
@ -6,10 +6,10 @@ package storelogger
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"storj.io/storj/storage/teststore"
|
||||
"storj.io/storj/storage/testsuite"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func TestSuite(t *testing.T) {
|
||||
|
@ -7,10 +7,10 @@ import (
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"storj.io/storj/storage"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
|
||||
"storj.io/storj/storage"
|
||||
)
|
||||
|
||||
func testList(t *testing.T, store storage.KeyValueStore) {
|
||||
|
@ -8,10 +8,10 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"storj.io/storj/storage"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
|
||||
"storj.io/storj/storage"
|
||||
)
|
||||
|
||||
func testListV2(t *testing.T, store storage.KeyValueStore) {
|
||||
|
@ -6,10 +6,10 @@ package testsuite
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"storj.io/storj/storage"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
|
||||
"storj.io/storj/storage"
|
||||
)
|
||||
|
||||
func newItem(key, value string, isPrefix bool) storage.ListItem {
|
||||
|
Loading…
Reference in New Issue
Block a user