From 5936e6a4aab541a437fa9464468b51f91d019a2a Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 16 Jan 2026 02:09:12 +0900 Subject: internal/pkg: parallelise scrub This significantly improves scrubbing performance. Since the cache directory structure is friendly to simultaneous access, this is possible without synchronisation. Signed-off-by: Ophestra --- internal/pkg/dir_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/pkg/dir_test.go') diff --git a/internal/pkg/dir_test.go b/internal/pkg/dir_test.go index c6a57e49..9ded5bfc 100644 --- a/internal/pkg/dir_test.go +++ b/internal/pkg/dir_test.go @@ -523,7 +523,8 @@ func TestFlatten(t *testing.T) { t.Run("hash", func(t *testing.T) { t.Parallel() - if got, err := pkg.HashFS(tc.fsys, "."); err != nil { + var got pkg.Checksum + if err := pkg.HashFS(&got, tc.fsys, "."); err != nil { t.Fatalf("HashFS: error = %v", err) } else if got != tc.sum { t.Fatalf("HashFS: %v", &pkg.ChecksumMismatchError{ -- cgit v1.3.1