1
0
mirror of https://github.com/opencontainers/go-digest.git synced 2025-07-28 13:21:56 +03:00

fix: code optimization

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
guoguangwu
2023-05-29 22:55:12 +08:00
parent 19833f24b9
commit b03a7a20db

View File

@ -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