From ac4f2d69194375fdc5b8cd56777e697ee0c7e869 Mon Sep 17 00:00:00 2001 From: Henrique Spanoudis Matulis Date: Thu, 27 Feb 2025 04:05:20 -0500 Subject: [PATCH] fix: lint issues Signed-off-by: Henrique Spanoudis Matulis --- cmd/frontend/main.go | 1 + cmd/rule-evaluator/main_test.go | 2 +- pkg/export/export.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/frontend/main.go b/cmd/frontend/main.go index aa8df37123..90faf31248 100644 --- a/cmd/frontend/main.go +++ b/cmd/frontend/main.go @@ -155,6 +155,7 @@ func main() { level.Info(logger).Log("msg", "Starting web server for metrics", "listen", *listenAddress) return server.ListenAndServe() }, func(error) { + //nolint:fatcontext ctx, cancel = context.WithTimeout(ctx, time.Minute) if err := server.Shutdown(ctx); err != nil { //nolint:errcheck diff --git a/cmd/rule-evaluator/main_test.go b/cmd/rule-evaluator/main_test.go index 3fe25be07d..46033db1b2 100644 --- a/cmd/rule-evaluator/main_test.go +++ b/cmd/rule-evaluator/main_test.go @@ -58,7 +58,7 @@ func compareWarningsEquality(w1, w2 storage.Warnings) bool { if len(w1) != len(w2) { return false } - for i := range len(w1) { + for i := range w1 { if w1[i] != w2[i] && w1[i].Error() != w2[i].Error() { return false } diff --git a/pkg/export/export.go b/pkg/export/export.go index dd5104f785..366e54edf6 100644 --- a/pkg/export/export.go +++ b/pkg/export/export.go @@ -921,7 +921,7 @@ func (b *batch) empty() bool { // send the accumulated samples to their respective projects. It returns once all // requests have completed and notifies the pending shards. -func (b batch) send( +func (b *batch) send( ctx context.Context, sendOne func(context.Context, *monitoring_pb.CreateTimeSeriesRequest, ...gax.CallOption) error, ) {