mirror of
https://github.com/mjl-/mox.git
synced 2025-07-19 00:46:36 +03:00
rename variables, struct fields and functions to include an "x" when they can panic for handling errors
and document the convention in develop.txt. spurred by running errcheck again (it has been a while). it still has too many false to enable by default.
This commit is contained in:
6
main.go
6
main.go
@ -1661,11 +1661,11 @@ new mail deliveries.
|
||||
}
|
||||
mustLoadConfig()
|
||||
|
||||
ctl := xctl()
|
||||
ctl.xwrite("stop")
|
||||
xctl := xctl()
|
||||
xctl.xwrite("stop")
|
||||
// Read will hang until remote has shut down.
|
||||
buf := make([]byte, 128)
|
||||
n, err := ctl.conn.Read(buf)
|
||||
n, err := xctl.conn.Read(buf)
|
||||
if err == nil {
|
||||
log.Fatalf("expected eof after graceful shutdown, got data %q", buf[:n])
|
||||
} else if err != io.EOF {
|
||||
|
Reference in New Issue
Block a user