diff --git a/gorush/global.go b/gorush/global.go index b99149f..5e417b3 100644 --- a/gorush/global.go +++ b/gorush/global.go @@ -2,6 +2,7 @@ package gorush import ( "crypto/tls" + "github.com/Sirupsen/logrus" "github.com/appleboy/gorush/config" apns "github.com/sideshow/apns2" diff --git a/gorush/log_test.go b/gorush/log_test.go index e637231..92cbdc2 100644 --- a/gorush/log_test.go +++ b/gorush/log_test.go @@ -1,10 +1,11 @@ package gorush import ( + "testing" + "github.com/Sirupsen/logrus" "github.com/appleboy/gorush/config" "github.com/stretchr/testify/assert" - "testing" ) func TestSetLogLevel(t *testing.T) { diff --git a/gorush/notification.go b/gorush/notification.go index 33d67e9..7ca9fba 100644 --- a/gorush/notification.go +++ b/gorush/notification.go @@ -3,14 +3,15 @@ package gorush import ( "errors" "fmt" - "github.com/google/go-gcm" - apns "github.com/sideshow/apns2" - "github.com/sideshow/apns2/certificate" - "github.com/sideshow/apns2/payload" "net/http" "net/url" "path/filepath" "time" + + "github.com/google/go-gcm" + apns "github.com/sideshow/apns2" + "github.com/sideshow/apns2/certificate" + "github.com/sideshow/apns2/payload" ) // D provide string array diff --git a/gorush/notification_test.go b/gorush/notification_test.go index d6d2b88..f83f9c4 100644 --- a/gorush/notification_test.go +++ b/gorush/notification_test.go @@ -2,15 +2,16 @@ package gorush import ( "encoding/json" + "log" + "os" + "testing" + "time" + "github.com/appleboy/gorush/config" "github.com/buger/jsonparser" "github.com/google/go-gcm" "github.com/sideshow/apns2" "github.com/stretchr/testify/assert" - "log" - "os" - "testing" - "time" ) func TestDisabledAndroidIosConf(t *testing.T) { diff --git a/gorush/version.go b/gorush/version.go index 45dd995..58c3ab0 100644 --- a/gorush/version.go +++ b/gorush/version.go @@ -2,8 +2,9 @@ package gorush import ( "fmt" - "github.com/gin-gonic/gin" "runtime" + + "github.com/gin-gonic/gin" ) var version string diff --git a/storage/boltdb/boltdb_test.go b/storage/boltdb/boltdb_test.go index 265977b..743504e 100644 --- a/storage/boltdb/boltdb_test.go +++ b/storage/boltdb/boltdb_test.go @@ -1,9 +1,10 @@ package boltdb import ( + "testing" + c "github.com/appleboy/gorush/config" "github.com/stretchr/testify/assert" - "testing" ) func TestBoltDBEngine(t *testing.T) { diff --git a/storage/buntdb/buntdb.go b/storage/buntdb/buntdb.go index 7f423a5..559f689 100644 --- a/storage/buntdb/buntdb.go +++ b/storage/buntdb/buntdb.go @@ -2,9 +2,10 @@ package buntdb import ( "fmt" + "strconv" + "github.com/appleboy/gorush/config" "github.com/tidwall/buntdb" - "strconv" ) // Stat variable for redis diff --git a/storage/buntdb/buntdb_test.go b/storage/buntdb/buntdb_test.go index 2753f2d..0da440d 100644 --- a/storage/buntdb/buntdb_test.go +++ b/storage/buntdb/buntdb_test.go @@ -1,10 +1,11 @@ package buntdb import ( - c "github.com/appleboy/gorush/config" - "github.com/stretchr/testify/assert" "os" "testing" + + c "github.com/appleboy/gorush/config" + "github.com/stretchr/testify/assert" ) func TestBuntDBEngine(t *testing.T) { diff --git a/storage/leveldb/leveldb.go b/storage/leveldb/leveldb.go index 7064c95..33307c5 100644 --- a/storage/leveldb/leveldb.go +++ b/storage/leveldb/leveldb.go @@ -2,9 +2,10 @@ package leveldb import ( "fmt" + "strconv" + "github.com/appleboy/gorush/config" "github.com/syndtr/goleveldb/leveldb" - "strconv" ) // Stat variable for redis diff --git a/storage/leveldb/leveldb_test.go b/storage/leveldb/leveldb_test.go index 82c9feb..6df0c04 100644 --- a/storage/leveldb/leveldb_test.go +++ b/storage/leveldb/leveldb_test.go @@ -1,10 +1,11 @@ package leveldb import ( - c "github.com/appleboy/gorush/config" - "github.com/stretchr/testify/assert" "os" "testing" + + c "github.com/appleboy/gorush/config" + "github.com/stretchr/testify/assert" ) func TestLevelDBEngine(t *testing.T) { diff --git a/storage/memory/memory_test.go b/storage/memory/memory_test.go index 4d428a9..360581d 100644 --- a/storage/memory/memory_test.go +++ b/storage/memory/memory_test.go @@ -1,8 +1,9 @@ package memory import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestMemoryEngine(t *testing.T) { diff --git a/storage/redis/redis.go b/storage/redis/redis.go index 2d30340..ce574eb 100644 --- a/storage/redis/redis.go +++ b/storage/redis/redis.go @@ -1,10 +1,11 @@ package redis import ( - "github.com/appleboy/gorush/config" - "gopkg.in/redis.v5" "log" "strconv" + + "github.com/appleboy/gorush/config" + "gopkg.in/redis.v5" ) // Stat variable for redis diff --git a/storage/redis/redis_test.go b/storage/redis/redis_test.go index e53b755..37e3ae1 100644 --- a/storage/redis/redis_test.go +++ b/storage/redis/redis_test.go @@ -1,9 +1,10 @@ package redis import ( + "testing" + c "github.com/appleboy/gorush/config" "github.com/stretchr/testify/assert" - "testing" ) func TestRedisServerError(t *testing.T) {