From 6c1c509a5c81dd420cbb2d3193156b84b2ff9159 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 24 Apr 2016 15:57:38 +0800 Subject: [PATCH] fix golint. Signed-off-by: Bo-Yi Wu --- gorush/notification.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gorush/notification.go b/gorush/notification.go index 2dc8949..5a7ffec 100644 --- a/gorush/notification.go +++ b/gorush/notification.go @@ -77,7 +77,7 @@ type PushNotification struct { Alert Alert `json:"alert,omitempty"` } -// CheckGCMMessage for check GCM Message +// CheckMessage for check request message func CheckMessage(req PushNotification) error { var msg string if req.Message == "" { @@ -104,6 +104,7 @@ func CheckMessage(req PushNotification) error { return errors.New(msg) } + // ref: https://developers.google.com/cloud-messaging/http-server-ref if req.Platform == PlatFormAndroid && (req.TimeToLive < 0 || 2419200 < req.TimeToLive) { msg = "the message's TimeToLive field must be an integer " + "between 0 and 2419200 (4 weeks)"