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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-09 14:10:08 +01:00
|
|
|
// useServices adds the given service(s) to the Notifier's services list.
|
2022-04-25 23:52:39 +02:00
|
|
|
func (n *Notify) useServices(services ...Notifier) {
|
|
|
|
for _, s := range services {
|
2021-02-02 22:03:42 +01:00
|
|
|
n.useService(s)
|
|
|
|
}
|
2021-01-25 00:14:21 +01:00
|
|
|
}
|
2022-02-09 14:10:08 +01:00
|
|
|
|
|
|
|
// UseServices adds the given service(s) to the Notifier's services list.
|
2022-04-25 23:52:39 +02:00
|
|
|
func (n *Notify) UseServices(services ...Notifier) {
|
|
|
|
n.useServices(services...)
|
2022-02-09 14:10:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// UseServices adds the given service(s) to the Notifier's services list.
|
2022-04-25 23:52:39 +02:00
|
|
|
func UseServices(services ...Notifier) {
|
|
|
|
std.UseServices(services...)
|
2022-02-09 14:10:08 +01:00
|
|
|
}
|