MCPcopy Create free account
hub / github.com/conforma/cli / uniqueDir

Function uniqueDir

internal/policy/source/source.go:229–231  ·  view source on GitHub ↗

uniqueDir generates a reasonably unique string using an SHA224 sum

(input string)

Source from the content-addressed store, hash-verified

227
228// uniqueDir generates a reasonably unique string using an SHA224 sum
229func uniqueDir(input string) string {
230 return fmt.Sprintf("%x", sha256.Sum224([]byte(input)))[:9]
231}
232
233type inlineData struct {
234 source []byte

Callers 2

uniqueDestinationFunction · 0.85
TestGoGetterDownloadFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestGoGetterDownloadFunction · 0.68