1
0
mirror of https://github.com/nikoksr/notify.git synced 2024-11-30 08:46:43 +02:00
notify/use.go
2022-04-22 20:33:24 +02:00

26 lines
684 B
Go

package notify
// useService adds a given service to the Notifier's services list.
func (n *Notify) useService(service Notifier) {
if service != nil {
n.notifiers = append(n.notifiers, service)
}
}
// useServices adds the given service(s) to the Notifier's services list.
func (n *Notify) useServices(service ...Notifier) {
for _, s := range service {
n.useService(s)
}
}
// UseServices adds the given service(s) to the Notifier's services list.
func (n *Notify) UseServices(service ...Notifier) {
n.useServices(service...)
}
// UseServices adds the given service(s) to the Notifier's services list.
func UseServices(service ...Notifier) {
std.UseServices(service...)
}