From b03a7a20db5ebde5526bd4b2347bacc7b4cf7750 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Mon, 29 May 2023 22:55:12 +0800 Subject: [PATCH] fix: code optimization Signed-off-by: guoguangwu --- algorithm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/algorithm.go b/algorithm.go index b09e566..6641954 100644 --- a/algorithm.go +++ b/algorithm.go @@ -164,7 +164,7 @@ func (a Algorithm) Hash() hash.Hash { if !a.Available() { // Empty algorithm string is invalid if a == "" { - panic(fmt.Sprintf("empty digest algorithm, validate before calling Algorithm.Hash()")) + panic("empty digest algorithm, validate before calling Algorithm.Hash()") } // NOTE(stevvooe): A missing hash is usually a programming error that