You've already forked go-digest
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:
@ -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
|
||||
|
Reference in New Issue
Block a user