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

Fix misc. linter issues (comments, variable naming, etc.)

We've accumulated a few linter issues around comments and a couple of
variable names.

While none of them is major, this patch cleans them up so it's easier to
go through the linter output, and we can start being more strict about
it.
This commit is contained in:
Alberto Bertogli
2022-08-27 23:16:01 +01:00
parent 6dfff9a790
commit e85c31782b
11 changed files with 30 additions and 13 deletions

View File

@@ -119,7 +119,11 @@ func (m *miniDNS) listenAndServeUDP(addr string) {
log.Fatalf("error packing reply: %v", err)
}
conn.WriteTo(rbuf, addr)
_, err = conn.WriteTo(rbuf, addr)
if err != nil {
log.Infof("%v/%-5d error writing: %v",
addr, msg.ID, err)
}
}
}
@@ -245,7 +249,7 @@ func (m *miniDNS) loadZones(f *os.File) {
continue
}
vs := regexp.MustCompile("\\s+").Split(line, 3)
vs := regexp.MustCompile(`\s+`).Split(line, 3)
if len(vs) != 3 {
log.Fatalf("line %d: invalid format", lineno)
}