Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

serve: fix errcheck lint errors from golangci-lint v2.15.0

Nick Craig-Wood5fe99911ca90
diff --git a/cmd/serve/rc.go b/cmd/serve/rc.go
index a0594102c..aa634f48b 100644
--- a/cmd/serve/rc.go
+++ b/cmd/serve/rc.go
@@ -220,7 +220,7 @@ func stopRc(_ context.Context, in rc.Params) (out rc.Params, err error) {
return nil, fmt.Errorf("server with id=%q not found", id)
}
err = s.h.Shutdown()
- <-s.errChan // ignore server return error - likely is "use of closed network connection"
+ <-s.errChan //nolint:errcheck // ignore server return error - likely is "use of closed network connection"
delete(servers, id)
return nil, err
}
@@ -356,7 +356,7 @@ func stopAll(_ context.Context, in rc.Params) (out rc.Params, err error) {
ec := errcount.New()
for id, s := range servers {
ec.Add(s.h.Shutdown())
- <-s.errChan // ignore server return error - likely is "use of closed network connection"
+ <-s.errChan //nolint:errcheck // ignore server return error - likely is "use of closed network connection"
delete(servers, id)
}
return nil, ec.Err("error when stopping server")