1
0
mirror of https://github.com/nikoksr/notify.git synced 2025-07-13 01:30:32 +02:00
Files
notify/use.go

17 lines
386 B
Go
Raw Normal View History

2021-01-25 00:14:21 +01:00
package notify
2021-01-31 12:14:48 +00:00
// useService adds a given service to the notifiers services list.
func (n *Notify) useService(service Notifier) {
2021-01-25 00:14:21 +01:00
if service == nil {
return
}
n.notifiers = append(n.notifiers, service)
2021-01-25 00:14:21 +01:00
}
// UseService adds the given service(s) to the notifiers services list.
func (n *Notify) UseService(service ...Notifier) {
for _, s := range service {
n.useService(s)
}
2021-01-25 00:14:21 +01:00
}