Add error handling for checkAddress
j3s j3s@c3f.net
Sun, 17 Nov 2019 13:33:02 -0600
1 files changed,
4 insertions(+),
1 deletions(-)
jump to
M
main.go
→
main.go
@@ -80,7 +80,10 @@ }
func checkAddress(addrs []string, checkAddr string) bool { for _, to := range addrs { - t, _ := mail.ParseAddress(to) + t, err := mail.ParseAddress(to) + if err != nil { + log.Printf("checkAddress: failed to parse address") + } if t.Address == checkAddr { return true }