small pixel drawing of a pufferfish clist

Add error handling for checkAddress
j3s j3s@c3f.net
Sun, 17 Nov 2019 13:33:02 -0600
commit

7f28f8df4543a2c7ef3da8029225043f2951f402

parent

2be358616d65dcfdbdbd9c22de56bad3eef2c46c

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M main.gomain.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 }