From d922143bc562320340be6caf2be6bd3d4da64d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=AC=A7?= Date: Mon, 12 Jun 2017 10:40:15 +0800 Subject: [PATCH] lint code for import (#939) --- binding/binding_test.go | 3 +-- binding/json.go | 1 - binding/protobuf.go | 4 ++-- examples/app-engine/hello.go | 3 ++- gin_integration_test.go | 2 +- middleware_test.go | 1 - 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/binding/binding_test.go b/binding/binding_test.go index cf005948..d7cdf77a 100644 --- a/binding/binding_test.go +++ b/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 { diff --git a/binding/json.go b/binding/json.go index 6e532443..486b9733 100644 --- a/binding/json.go +++ b/binding/json.go @@ -6,7 +6,6 @@ package binding import ( "encoding/json" - "net/http" ) diff --git a/binding/protobuf.go b/binding/protobuf.go index 9f956228..c7eb84e9 100644 --- a/binding/protobuf.go +++ b/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{} diff --git a/examples/app-engine/hello.go b/examples/app-engine/hello.go index a5e17962..da7e4ae4 100644 --- a/examples/app-engine/hello.go +++ b/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. diff --git a/gin_integration_test.go b/gin_integration_test.go index b4bde1af..2674a618 100644 --- a/gin_integration_test.go +++ b/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) { diff --git a/middleware_test.go b/middleware_test.go index c77f8276..0c56f4e4 100644 --- a/middleware_test.go +++ b/middleware_test.go @@ -7,7 +7,6 @@ package gin import ( "errors" "strings" - "testing" "github.com/stretchr/testify/assert"