From 187aed078c2e8c583a04b33035a89479155d30b5 Mon Sep 17 00:00:00 2001 From: Daniel Peukert Date: Mon, 23 Jun 2025 19:27:39 +0200 Subject: [PATCH] Fix fmt typos --- monitor/monitor.go | 2 +- monitor/notify.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor/monitor.go b/monitor/monitor.go index 8a00b14..3f153e4 100644 --- a/monitor/monitor.go +++ b/monitor/monitor.go @@ -206,7 +206,7 @@ func newLogClient(config *Config, ctlog *loglist.Log) (ctclient.Log, ctclient.Is logGetter: client, }, nil default: - return nil, nil, fmt.Errorf("log uses unknown protocol") + return nil, nil, errors.New("log uses unknown protocol") } } diff --git a/monitor/notify.go b/monitor/notify.go index 61cbdcc..8ff5a2c 100644 --- a/monitor/notify.go +++ b/monitor/notify.go @@ -99,7 +99,7 @@ func sendEmail(ctx context.Context, to []string, notif *notification) error { if err := sendmail.Run(); err == nil || err == exec.ErrWaitDelay { return nil } else if sendmailCtx.Err() != nil && ctx.Err() == nil { - return fmt.Errorf("error sending email to %v: sendmail command timed out") + return fmt.Errorf("error sending email to %v: sendmail command timed out", to) } else if ctx.Err() != nil { // if the context was canceled, we can't be sure that the error is the fault of sendmail, so ignore it return ctx.Err()