diff options
Diffstat (limited to 'internal/state.go')
| -rw-r--r-- | internal/state.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/state.go b/internal/state.go index 516e63a..cb2c665 100644 --- a/internal/state.go +++ b/internal/state.go @@ -130,7 +130,9 @@ func (s state) persist() error { return os.WriteFile(s.stateFile, jsonData, os.ModePerm) } -func (s state) report(renotify, force bool) (string, string, bool) { +// report generates the notification email content. +// statusPageURL is included as a link to the HTML status page. +func (s state) report(renotify, force bool, statusPageURL string) (string, string, bool) { var sb strings.Builder sb.WriteString("This is the recent Gogios report!\n\n") @@ -154,6 +156,10 @@ func (s state) report(renotify, force bool) (string, string, bool) { sb.WriteString("There are no stale alerts...\n\n") } + sb.WriteString("# Status page:\n\n") + sb.WriteString(statusPageURL) + sb.WriteString("\n\n") + sb.WriteString("Have a nice day!\n") subject := fmt.Sprintf("GOGIOS Report [C:%d W:%d U:%d S:%d OK:%d]", |
