1
0
mirror of https://github.com/nikoksr/notify.git synced 2024-12-12 10:13:59 +02:00
notify/use.go
2021-02-10 14:52:09 +01:00

16 lines
382 B
Go

package notify
// useService adds a given service to the Notifier's services list.
func (n *Notify) useService(service Notifier) {
if service != nil {
n.notifiers = append(n.notifiers, service)
}
}
// UseServices adds the given service(s) to the Notifier's services list.
func (n *Notify) UseServices(service ...Notifier) {
for _, s := range service {
n.useService(s)
}
}