From ddfdffb77c4a7990057a7c984abba737f0c8402b Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 6 Mar 2026 09:07:51 +0800 Subject: format/pack/ingest: Actually we could just use algo.String() here --- format/pack/ingest/ingest_test.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/format/pack/ingest/ingest_test.go b/format/pack/ingest/ingest_test.go index d3bb9e41..1bc2ec0f 100644 --- a/format/pack/ingest/ingest_test.go +++ b/format/pack/ingest/ingest_test.go @@ -14,22 +14,11 @@ import ( "codeberg.org/lindenii/furgit/repository" ) -func fixtureAlgorithmDir(algo objectid.Algorithm) string { - switch algo { //nolint:exhaustive - case objectid.AlgorithmSHA1: - return "sha1" - case objectid.AlgorithmSHA256: - return "sha256" - default: - return "" - } -} - // fixturePath returns one fixture file path for the selected algorithm. func fixturePath(t *testing.T, algo objectid.Algorithm, name string) string { t.Helper() - dir := fixtureAlgorithmDir(algo) + dir := algo.String() if dir == "" { t.Fatalf("unsupported fixture algorithm: %v", algo) } -- cgit v1.3.1-10-gc9f91