prometheus/promql
beorn7 747c5ee2b1 Apply analyzer "modernize" to the whole codebase
See
https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize
for details.

This ran into a few issues (arguably bugs in the modernize tool),
which I will fix in the next commit, so that we have transparency what
was done automatically.

Beyond those hiccups, I believe all the changes applied are
legitimate. Even where there might be no tangible direct gain, I would
argue it's still better to use the "modern" way to avoid micro
discussions in tiny style PRs later.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-08-27 14:48:41 +02:00
..
fuzz-data
parser Apply analyzer "modernize" to the whole codebase 2025-08-27 14:48:41 +02:00
promqltest Apply analyzer "modernize" to the whole codebase 2025-08-27 14:48:41 +02:00
bench_test.go Apply analyzer "modernize" to the whole codebase 2025-08-27 14:48:41 +02:00
durations.go
durations_test.go
engine.go Apply analyzer "modernize" to the whole codebase 2025-08-27 14:48:41 +02:00
engine_internal_test.go Histograms: set annotation when adding or subtracting histograms that have `not_reset` and `reset` hints. 2025-08-20 15:00:45 +02:00
engine_test.go Apply analyzer "modernize" to the whole codebase 2025-08-27 14:48:41 +02:00
functions.go Apply analyzer "modernize" to the whole codebase 2025-08-27 14:48:41 +02:00
functions_internal_test.go annotations: histogram counter reset warning includes operation 2025-08-20 15:14:21 +02:00
functions_test.go Apply analyzer "modernize" to the whole codebase 2025-08-27 14:48:41 +02:00
fuzz.go
fuzz_test.go
histogram_stats_iterator.go
histogram_stats_iterator_test.go
info.go
info_test.go
promql_test.go Apply analyzer "modernize" to the whole codebase 2025-08-27 14:48:41 +02:00
quantile.go
quantile_test.go
query_logger.go Apply analyzer "modernize" to the whole codebase 2025-08-27 14:48:41 +02:00
query_logger_test.go Apply analyzer "modernize" to the whole codebase 2025-08-27 14:48:41 +02:00
value.go Apply analyzer "modernize" to the whole codebase 2025-08-27 14:48:41 +02:00
value_test.go