chore(lint): modernize Go (#7536)

Use modern Go constructs through the modernize analyzer from the
golang.org/x/tools package.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
This commit is contained in:
Ville Vesilehto
2025-09-10 23:08:27 +03:00
committed by GitHub
parent afdd41a266
commit 39abf5aeba
48 changed files with 150 additions and 193 deletions

View File

@@ -319,7 +319,7 @@ func TestRequestMatch(t *testing.T) {
func BenchmarkRequestDo(b *testing.B) {
st := testRequest()
for range b.N {
for b.Loop() {
st.Do()
}
}
@@ -327,7 +327,7 @@ func BenchmarkRequestDo(b *testing.B) {
func BenchmarkRequestSize(b *testing.B) {
st := testRequest()
for range b.N {
for b.Loop() {
st.Size()
}
}
@@ -346,8 +346,7 @@ func BenchmarkRequestScrub(b *testing.B) {
fmt.Sprintf("10-0-0-%d.default.pod.k8s.example.com. 10 IN A 10.0.0.%d", i, i)))
}
b.ResetTimer()
for range b.N {
for b.Loop() {
st.Scrub(reply.Copy())
}
}