MCPcopy Index your code
hub / github.com/codehamr/codehamr / hashOf

Function hashOf

internal/update/update_test.go:60–64  ·  view source on GitHub ↗

hashOf returns the sha256 hex digest, matching goreleaser's manifest format.

(body []byte)

Source from the content-addressed store, hash-verified

58
59// hashOf returns the sha256 hex digest, matching goreleaser's manifest format.
60func hashOf(body []byte) string {
61 h := sha256.New()
62 h.Write(body)
63 return hex.EncodeToString(h.Sum(nil))
64}
65
66// platformAsset is the asset name Apply expects for the current runtime,
67// via the same assetName helper production uses.

Calls 1

WriteMethod · 0.80

Tested by

no test coverage detected