From 0f09f5c851bab1ac2d624448fd04176c203f26a8 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Fri, 15 Apr 2016 18:06:16 +0800 Subject: [PATCH] fix gofmt error. Signed-off-by: Bo-Yi Wu --- gorush/global.go | 2 +- gorush/notification_test.go | 12 ++++++------ gorush/server_test.go | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gorush/global.go b/gorush/global.go index b5c65ff..234604f 100644 --- a/gorush/global.go +++ b/gorush/global.go @@ -18,7 +18,7 @@ var ( // LogAccess is log server request log LogAccess *logrus.Logger // LogError is log server error log - LogError *logrus.Logger + LogError *logrus.Logger // RushStatus is notification status RushStatus StatusApp ) diff --git a/gorush/notification_test.go b/gorush/notification_test.go index e6fd10c..746587c 100644 --- a/gorush/notification_test.go +++ b/gorush/notification_test.go @@ -340,13 +340,13 @@ func TestSenMultipleNotifications(t *testing.T) { req := RequestPush{ Notifications: []PushNotification{ //ios - PushNotification{ + { Tokens: []string{"11aa01229f15f0f0c52029d8cf8cd0aeaf2365fe4cebc4af26cd6d76b7919ef7"}, Platform: 1, Message: "Welcome", }, // android - PushNotification{ + { Tokens: []string{androidToken, "bbbbb"}, Platform: 2, Message: "Welcome", @@ -373,13 +373,13 @@ func TestDisabledAndroidNotifications(t *testing.T) { req := RequestPush{ Notifications: []PushNotification{ //ios - PushNotification{ + { Tokens: []string{"11aa01229f15f0f0c52029d8cf8cd0aeaf2365fe4cebc4af26cd6d76b7919ef7"}, Platform: 1, Message: "Welcome", }, // android - PushNotification{ + { Tokens: []string{androidToken, "bbbbb"}, Platform: 2, Message: "Welcome", @@ -406,13 +406,13 @@ func TestDisabledIosNotifications(t *testing.T) { req := RequestPush{ Notifications: []PushNotification{ //ios - PushNotification{ + { Tokens: []string{"11aa01229f15f0f0c52029d8cf8cd0aeaf2365fe4cebc4af26cd6d76b7919ef7"}, Platform: 1, Message: "Welcome", }, // android - PushNotification{ + { Tokens: []string{androidToken, "bbbbb"}, Platform: 2, Message: "Welcome", diff --git a/gorush/server_test.go b/gorush/server_test.go index 6899d5a..c0946b4 100644 --- a/gorush/server_test.go +++ b/gorush/server_test.go @@ -154,12 +154,12 @@ func TestOutOfRangeMaxNotifications(t *testing.T) { r.POST("/api/push"). SetJSON(gofight.D{ "notifications": []gofight.D{ - gofight.D{ + { "tokens": []string{"aaaaa", "bbbbb"}, "platform": 2, "message": "Welcome", }, - gofight.D{ + { "tokens": []string{"aaaaa", "bbbbb"}, "platform": 2, "message": "Welcome", @@ -185,7 +185,7 @@ func TestSuccessPushHandler(t *testing.T) { r.POST("/api/push"). SetJSON(gofight.D{ "notifications": []gofight.D{ - gofight.D{ + { "tokens": []string{androidToken, "bbbbb"}, "platform": 2, "message": "Welcome",