mirror of
https://github.com/nikoksr/notify.git
synced 2025-04-27 12:32:11 +02:00
chore(comment): put actual type names into comments
This commit is contained in:
parent
4ffb7c09cf
commit
236e66e284
2
send.go
2
send.go
@ -5,7 +5,7 @@ import (
|
|||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Send calls the underlying notification services to send the given message to their respective endpoints.
|
// Send calls the underlying notification services to send the given subject and message to their respective endpoints.
|
||||||
func (n Notify) Send(subject, message string) error {
|
func (n Notify) Send(subject, message string) error {
|
||||||
if n.Disabled {
|
if n.Disabled {
|
||||||
return nil
|
return nil
|
||||||
|
4
use.go
4
use.go
@ -1,6 +1,6 @@
|
|||||||
package notify
|
package notify
|
||||||
|
|
||||||
// useService adds a given service to the notifiers 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
|
return
|
||||||
@ -8,7 +8,7 @@ func (n *Notify) useService(service Notifier) {
|
|||||||
n.notifiers = append(n.notifiers, service)
|
n.notifiers = append(n.notifiers, service)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UseServices adds the given service(s) to the notifiers services list.
|
// UseServices adds the given service(s) to the Notifier's services list.
|
||||||
func (n *Notify) UseServices(service ...Notifier) {
|
func (n *Notify) UseServices(service ...Notifier) {
|
||||||
for _, s := range service {
|
for _, s := range service {
|
||||||
n.useService(s)
|
n.useService(s)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user