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