Enable some linters (#3129)

Mostly those that did not require much work.

From #2960

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
qwerty287
2024-01-09 21:35:37 +01:00
committed by GitHub
parent 631b7c2fed
commit 768fd71841
21 changed files with 121 additions and 63 deletions

View File

@@ -74,8 +74,11 @@ func (s *State) Healthy() bool {
func (s *State) WriteTo(w io.Writer) (int64, error) {
s.Lock()
out, _ := json.Marshal(s)
out, err := json.Marshal(s)
s.Unlock()
if err != nil {
return 0, err
}
ret, err := w.Write(out)
return int64(ret), err
}