mirror of
https://github.com/nikoksr/notify.git
synced 2025-01-24 03:16:35 +02:00
bd82278932
AddReceivers was added to the notify.Notifier interface in 3d7cc206e13d7149c0e9750d257f43abd276b1f4 and the fact that it shouldn't be there was obviously overlooked during the code review. The AddReceivers function is present in all services so far, but it does not define the behavior of our services. The behavior is defined only by the Send function. The AddReceivers function is also not called once in the code on a notify.notifier. This can also be seen by the fact that I can remove the AddReceivers function from the notify.Notifier interface without getting any errors in the rest of the code.
10 lines
318 B
Go
10 lines
318 B
Go
package notify
|
|
|
|
// Notifier defines the behavior for notification services.
|
|
//
|
|
// The Send function simply sends a subject and a message string to the internal destination Notifier.
|
|
// E.g for telegram.Telegram it sends the message to the specified group chat.
|
|
type Notifier interface {
|
|
Send(string, string) error
|
|
}
|