MCPcopy
hub / github.com/helm/helm / stripDigestAlgorithm

Function stripDigestAlgorithm

pkg/downloader/chart_downloader.go:599–604  ·  view source on GitHub ↗

stripDigestAlgorithm removes the algorithm prefix (e.g., "sha256:") from a digest string. If no prefix is present, the original string is returned unchanged.

(digest string)

Source from the content-addressed store, hash-verified

597// stripDigestAlgorithm removes the algorithm prefix (e.g., "sha256:") from a digest string.
598// If no prefix is present, the original string is returned unchanged.
599func stripDigestAlgorithm(digest string) string {
600 if _, after, ok := strings.Cut(digest, ":"); ok {
601 return after
602 }
603 return digest
604}

Callers 3

TestStripDigestAlgorithmFunction · 0.85
DownloadToMethod · 0.85
DownloadToCacheMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestStripDigestAlgorithmFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…