瀏覽代碼

lint code for import (#939)

田欧 8 年之前
父節點
當前提交
d922143bc5
共有 6 個文件被更改,包括 6 次插入8 次删除
  1. 1 2
      binding/binding_test.go
  2. 0 1
      binding/json.go
  3. 2 2
      binding/protobuf.go
  4. 2 1
      examples/app-engine/hello.go
  5. 1 1
      gin_integration_test.go
  6. 0 1
      middleware_test.go

+ 1 - 2
binding/binding_test.go

@@ -12,9 +12,8 @@ import (
 
 	"github.com/gin-gonic/gin/binding/example"
 	"github.com/golang/protobuf/proto"
-	"github.com/ugorji/go/codec"
-
 	"github.com/stretchr/testify/assert"
+	"github.com/ugorji/go/codec"
 )
 
 type FooStruct struct {

+ 0 - 1
binding/json.go

@@ -6,7 +6,6 @@ package binding
 
 import (
 	"encoding/json"
-
 	"net/http"
 )
 

+ 2 - 2
binding/protobuf.go

@@ -5,10 +5,10 @@
 package binding
 
 import (
-	"github.com/golang/protobuf/proto"
-
 	"io/ioutil"
 	"net/http"
+
+	"github.com/golang/protobuf/proto"
 )
 
 type protobufBinding struct{}

+ 2 - 1
examples/app-engine/hello.go

@@ -1,8 +1,9 @@
 package hello
 
 import (
-	"github.com/gin-gonic/gin"
 	"net/http"
+
+	"github.com/gin-gonic/gin"
 )
 
 // This function's name is a must. App Engine uses it to drive the requests properly.

+ 1 - 1
gin_integration_test.go

@@ -6,12 +6,12 @@ import (
 	"io/ioutil"
 	"net"
 	"net/http"
+	"net/http/httptest"
 	"os"
 	"testing"
 	"time"
 
 	"github.com/stretchr/testify/assert"
-	"net/http/httptest"
 )
 
 func testRequest(t *testing.T, url string) {

+ 0 - 1
middleware_test.go

@@ -7,7 +7,6 @@ package gin
 import (
 	"errors"
 	"strings"
-
 	"testing"
 
 	"github.com/stretchr/testify/assert"