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

Function logMetadata

internal/policy/source/source.go:211–222  ·  view source on GitHub ↗
(m metadata.Metadata)

Source from the content-addressed store, hash-verified

209}
210
211func logMetadata(m metadata.Metadata) {
212 if m != nil {
213 switch v := m.(type) {
214 case *gitMetadata.GitMetadata:
215 log.Debugf("SHA: %s\n", v.LatestCommit)
216 case *ociMetadata.OCIMetadata:
217 log.Debugf("Image digest: %s\n", v.Digest)
218 case *fileMetadata.FSMetadata:
219 log.Debugf("Path: %s\n", v.Path)
220 }
221 }
222}
223
224func uniqueDestination(rootDir string, subdir string, sourceUrl string) string {
225 return path.Join(rootDir, subdir, uniqueDir(sourceUrl))

Callers 2

getPolicyThroughCacheFunction · 0.85
TestLogMetadataFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestLogMetadataFunction · 0.68