1
0
mirror of https://github.com/nikoksr/notify.git synced 2025-01-10 00:28:36 +02:00
notify/use.go
PL Pery 5f17225503
rename: Notify.UseService to Notify.UseServices
Co-authored-by: Niko Köser <koeserniko@gmail.com>
2021-02-05 14:24:31 +01:00

17 lines
388 B
Go

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