MCPcopy Create free account
hub / github.com/docker/cli / getTag

Function getTag

cmd/docker-trust/internal/trust/trust.go:370–379  ·  view source on GitHub ↗
(ref reference.Named)

Source from the content-addressed store, hash-verified

368}
369
370func getTag(ref reference.Named) string {
371 switch x := ref.(type) {
372 case reference.Digested:
373 return "" // TODO(thaJeztah): is it intentional to discard the tag when "Tagged+Digested"?
374 case reference.Tagged:
375 return x.Tag()
376 default:
377 return ""
378 }
379}
380
381func getDigest(ref reference.Named) digest.Digest {
382 switch x := ref.(type) {

Callers 2

TestGetTagFunction · 0.85

Calls 1

TagMethod · 0.45

Tested by 1

TestGetTagFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…