MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / CheckHashErr

Function CheckHashErr

internal/utils/bfs/hash.go:27–32  ·  view source on GitHub ↗
(hash string)

Source from the content-addressed store, hash-verified

25}
26
27func CheckHashErr(hash string) error {
28 if CheckHash(hash) {
29 return nil
30 }
31 return fmt.Errorf("check hash '%s' failed: %w", hash, ErrInvalidHash)
32}
33
34func Hash(s string) string {
35 return stringutil.Md5(s)

Callers 7

bPathForHashMethod · 0.85
OpenFileWriterMethod · 0.85
OpenFileReaderMethod · 0.85
ExistFileMethod · 0.85
RemoveFileMethod · 0.85

Calls 2

CheckHashFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected