2021-01-25 01:14:21 +02:00
|
|
|
package notify
|
|
|
|
|
2021-02-10 15:51:32 +02:00
|
|
|
// useService adds a given service to the Notifier's services list.
|
2021-01-25 06:05:28 +02:00
|
|
|
func (n *Notify) useService(service Notifier) {
|
2021-01-25 01:14:21 +02:00
|
|
|
if service == nil {
|
|
|
|
return
|
|
|
|
}
|
2021-01-25 06:05:28 +02:00
|
|
|
n.notifiers = append(n.notifiers, service)
|
2021-01-25 01:14:21 +02:00
|
|
|
}
|
|
|
|
|
2021-02-10 15:51:32 +02:00
|
|
|
// UseServices adds the given service(s) to the Notifier's services list.
|
2021-02-05 15:24:31 +02:00
|
|
|
func (n *Notify) UseServices(service ...Notifier) {
|
2021-02-02 23:03:42 +02:00
|
|
|
for _, s := range service {
|
|
|
|
n.useService(s)
|
|
|
|
}
|
2021-01-25 01:14:21 +02:00
|
|
|
}
|