1
0
mirror of https://github.com/nikoksr/notify.git synced 2025-03-19 21:08:48 +02:00

refactor(use): simplify useService function

This commit is contained in:
Niko Köser 2021-02-10 14:52:09 +01:00
parent 236e66e284
commit b3cad8fe68
No known key found for this signature in database
GPG Key ID: F3F28C118DAA6375

5
use.go
View File

@ -2,10 +2,9 @@ package notify
// useService adds a given service to the Notifier's services list.
func (n *Notify) useService(service Notifier) {
if service == nil {
return
if service != nil {
n.notifiers = append(n.notifiers, service)
}
n.notifiers = append(n.notifiers, service)
}
// UseServices adds the given service(s) to the Notifier's services list.