Bladeren bron

enables goimports lint

Diego Alvarez 4 jaren geleden
bovenliggende
commit
8a56b725ac

+ 3 - 3
.golangci.yml

@@ -38,16 +38,16 @@ linters:
   disable-all: true
   enable:
     - bodyclose
-    # - deadcode
+    - deadcode
     - depguard
     - dogsled
     # - dupl
-    # - errcheck
+    - errcheck
     - funlen
     # - gocritic
     - gocyclo
     - gofmt
-    # - goimports
+    - goimports
     # - golint
     # - gosec
     # - gosimple

+ 1 - 1
compress.go

@@ -6,7 +6,7 @@ import (
 	"fmt"
 	"sync"
 
-	"github.com/eapache/go-xerial-snappy"
+	snappy "github.com/eapache/go-xerial-snappy"
 	"github.com/pierrec/lz4"
 )
 

+ 1 - 1
decompress.go

@@ -7,7 +7,7 @@ import (
 	"io/ioutil"
 	"sync"
 
-	"github.com/eapache/go-xerial-snappy"
+	snappy "github.com/eapache/go-xerial-snappy"
 	"github.com/pierrec/lz4"
 )
 

+ 2 - 1
kerberos_client_test.go

@@ -2,9 +2,10 @@ package sarama
 
 import (
 	"errors"
+	"testing"
+
 	krbcfg "gopkg.in/jcmturner/gokrb5.v7/config"
 	"gopkg.in/jcmturner/gokrb5.v7/test/testdata"
-	"testing"
 )
 
 /*

+ 2 - 1
tools/kafka-console-producer/kafka-console-producer.go

@@ -8,9 +8,10 @@ import (
 	"os"
 	"strings"
 
+	"github.com/rcrowley/go-metrics"
+
 	"github.com/Shopify/sarama"
 	"github.com/Shopify/sarama/tools/tls"
-	"github.com/rcrowley/go-metrics"
 )
 
 var (

+ 2 - 1
tools/kafka-producer-performance/main.go

@@ -14,9 +14,10 @@ import (
 	gosync "sync"
 	"time"
 
+	metrics "github.com/rcrowley/go-metrics"
+
 	"github.com/Shopify/sarama"
 	"github.com/Shopify/sarama/tools/tls"
-	metrics "github.com/rcrowley/go-metrics"
 )
 
 var (

+ 2 - 1
zstd.go

@@ -1,8 +1,9 @@
 package sarama
 
 import (
-	"github.com/klauspost/compress/zstd"
 	"sync"
+
+	"github.com/klauspost/compress/zstd"
 )
 
 var (