MCPcopy
hub / github.com/kashav/fsql / FindHash

Function FindHash

transform/common.go:44–50  ·  view source on GitHub ↗

FindHash returns a func to create a new hash based on the provided name.

(name string)

Source from the content-addressed store, hash-verified

42
43// FindHash returns a func to create a new hash based on the provided name.
44func FindHash(name string) func() hash.Hash {
45 switch strings.ToUpper(name) {
46 case "SHA1":
47 return sha1.New
48 }
49 return nil
50}
51
52// ComputeHash applies the hash h to the file located at path. Returns a line
53// of dashes for directories.

Callers 5

cmpHashFunction · 0.92
TestCommon_FindHashFunction · 0.85
FormatFunction · 0.85
DefaultFormatValueFunction · 0.85
ParseFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCommon_FindHashFunction · 0.68