Notifier is a type that can send a notification.
| 4 | |
| 5 | // Notifier is a type that can send a notification. |
| 6 | type Notifier interface { |
| 7 | // Notify will be called after a correction is performed. |
| 8 | // It will be given the correction's message, the result of executing it, |
| 9 | // and a flag for whether this is a preview or if it actually ran. |
| 10 | // If preview is true, err will always be nil. |
| 11 | Notify(domain, provider string, message string, err error, preview bool) error |
| 12 | // Done will be called exactly once after all notifications are done. This will allow "batched" notifiers to flush and send |
| 13 | Done() |
| 14 | } |
| 15 | |
| 16 | // new notification types should add themselves to this array. |
| 17 | var initers = []func(map[string]string) Notifier{} |
no outgoing calls
no test coverage detected