1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

Minor cleanups for staticcheck issues

staticcheck found a couple of minor code cleanup improvements, like
unused variables or an out-of-order defer, mostly in tests.

This patch fixes those problems by making the necessary adjustments.

They're all fairly small, and should not change the logic in any
significant way.
This commit is contained in:
Alberto Bertogli
2025-10-24 12:00:18 +01:00
parent 7a4a4e4b34
commit f7e0e9fe65
5 changed files with 6 additions and 10 deletions

View File

@@ -56,11 +56,11 @@ func main() {
}
conn, err = tls.Dial("tcp", *addr, tlsConfig)
defer conn.Close()
} else {
conn, err = net.Dial("tcp", *addr)
}
notnil(err)
defer conn.Close()
// Send the message.
client, err := smtp.NewClient(conn, *addr)