2021-01-25 01:14:21 +02:00
|
|
|
package notify
|
|
|
|
|
2021-01-31 14:14:48 +02:00
|
|
|
// useService adds a given service to the notifiers 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-02 23:03:42 +02: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 01:14:21 +02:00
|
|
|
}
|