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-02-10 15:52:09 +02:00
|
|
|
if service != nil {
|
|
|
|
n.notifiers = append(n.notifiers, service)
|
2021-01-25 01:14:21 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-09 15:10:08 +02: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 23:03:42 +02:00
|
|
|
n.useService(s)
|
|
|
|
}
|
2021-01-25 01:14:21 +02:00
|
|
|
}
|
2022-02-09 15:10:08 +02: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 15:10:08 +02: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 15:10:08 +02:00
|
|
|
}
|