mirror of
https://github.com/nikoksr/notify.git
synced 2025-03-21 21:17:41 +02:00
refactor(use): simplify useService function
This commit is contained in:
parent
236e66e284
commit
b3cad8fe68
5
use.go
5
use.go
@ -2,10 +2,9 @@ package notify
|
|||||||
|
|
||||||
// useService adds a given service to the Notifier's services list.
|
// useService adds a given service to the Notifier's services list.
|
||||||
func (n *Notify) useService(service Notifier) {
|
func (n *Notify) useService(service Notifier) {
|
||||||
if service == nil {
|
if service != nil {
|
||||||
return
|
n.notifiers = append(n.notifiers, service)
|
||||||
}
|
}
|
||||||
n.notifiers = append(n.notifiers, service)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// UseServices adds the given service(s) to the Notifier's services list.
|
// UseServices adds the given service(s) to the Notifier's services list.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user