chore: rename gorush to notify package (#609)

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2021-07-24 01:56:33 +08:00
committed by GitHub
parent ce6e87639a
commit d9947ea44d
20 changed files with 73 additions and 73 deletions

View File

@@ -6,7 +6,7 @@ import (
"sync"
"time"
"github.com/appleboy/gorush/gorush"
"github.com/appleboy/gorush/notify"
"github.com/appleboy/gorush/queue"
"github.com/nsqio/go-nsq"
@@ -77,11 +77,11 @@ func NewWorker(opts ...Option) *Worker {
// In this case, a message with an empty body is simply ignored/discarded.
return nil
}
var notification *gorush.PushNotification
var notification *notify.PushNotification
if err := json.Unmarshal(msg.Body, &notification); err != nil {
return err
}
gorush.SendNotification(notification)
notify.SendNotification(notification)
return nil
},
}