From bfa6b9dcef7592e6dd8225aaa0d0ab5aef5b3f84 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sun, 9 Mar 2025 20:14:46 -0400 Subject: chore(refactoring): Refactor/modernizations (#2345) chore(refactoring): Refactor with modernization refactorings * range over int * replace interface{} with any * replace common map operations with maps.Copy/maps.Clone * simplifying loops with slices.Contains/ContainsFunc * modernize benchmarks with b.Loop * modernize tests with t.Context * use fmt.Appendf * range over strings.SplitSeq * use new stdlib crypto/pbkdf2 package --------- Signed-off-by: Dave Henderson --- internal/datafs/reader_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/datafs/reader_test.go') diff --git a/internal/datafs/reader_test.go b/internal/datafs/reader_test.go index 740cfa53..dbb37edc 100644 --- a/internal/datafs/reader_test.go +++ b/internal/datafs/reader_test.go @@ -127,7 +127,7 @@ func BenchmarkResolveURL(b *testing.B) { for _, a := range args { b.Run(fmt.Sprintf("base=%s_rel=%s", &a.url, a.rel), func(b *testing.B) { - for i := 0; i < b.N; i++ { + for b.Loop() { _, _ = resolveURL(a.url, a.rel) } }) -- cgit v1.2.3