From 479ec7fa5cd0b2e755166bed1bb16326fbfa173b Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Thu, 28 Apr 2016 14:39:34 +0800 Subject: [PATCH] Fixed #67 Support iOS apns-topic flag. Signed-off-by: Bo-Yi Wu --- gorush.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gorush.go b/gorush.go index 7e48168..afc28df 100644 --- a/gorush.go +++ b/gorush.go @@ -27,6 +27,7 @@ func main() { android := flag.Bool("android", false, "send android notification") ios := flag.Bool("ios", false, "send ios notification") production := flag.Bool("production", false, "production mode in iOS") + topic := flag.String("topic", "", "apns topic in iOS") flag.Parse() @@ -104,6 +105,10 @@ func main() { Message: *message, } + if *topic != "" { + req.Topic = *topic + } + err := gorush.CheckMessage(req) if err != nil {