From 6002485582541df9dff3e2c782a014564e22ed07 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 27 Jan 2026 19:05:00 +0100 Subject: hash: Use a hashAlgorithmDetails struct for single source of truth hashAlgorithm's are assumed to be valid; methods on invalid hashAlgorithms will panic from out-of-bounds read when it's not found in hashAlgorithmTable and that's expected and intended. --- hash_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hash_test.go') diff --git a/hash_test.go b/hash_test.go index dcbd7027..0b15fd38 100644 --- a/hash_test.go +++ b/hash_test.go @@ -18,7 +18,7 @@ func TestHashParse(t *testing.T) { var validHash string var expectedSize int - if repo.hashAlgo.size() == 32 { + if repo.hashAlgo.Size() == 32 { validHash = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" expectedSize = 32 } else { -- cgit v1.3.1-10-gc9f91