mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-07 17:47:14 +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:
@@ -5,6 +5,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -944,7 +945,7 @@ func (c *Conn) runPostDataHook(data []byte) ([]byte, bool, error) {
|
||||
|
||||
// The error contains the last line of stdout, so filters can pass
|
||||
// some rejection information back to the sender.
|
||||
err = fmt.Errorf(lastLine(string(out)))
|
||||
err = errors.New(lastLine(string(out)))
|
||||
return nil, permanent, err
|
||||
}
|
||||
|
||||
|
||||
@@ -282,7 +282,6 @@ func (s *Server) periodicallyReload() {
|
||||
return
|
||||
}
|
||||
|
||||
//lint:ignore SA1015 This lasts the program's lifetime.
|
||||
for range time.Tick(*reloadEvery) {
|
||||
s.Reload()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user