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

Function getManifestOptionsFromReference

internal/registryclient/client.go:187–196  ·  view source on GitHub ↗
(ref reference.Named)

Source from the content-addressed store, hash-verified

185}
186
187func getManifestOptionsFromReference(ref reference.Named) (digest.Digest, []distribution.ManifestServiceOption, error) {
188 if tagged, isTagged := ref.(reference.NamedTagged); isTagged {
189 tag := tagged.Tag()
190 return "", []distribution.ManifestServiceOption{distribution.WithTag(tag)}, nil
191 }
192 if digested, isDigested := ref.(reference.Canonical); isDigested {
193 return digested.Digest(), []distribution.ManifestServiceOption{}, nil
194 }
195 return "", nil, fmt.Errorf("%s no tag or digest", ref)
196}

Callers 2

getManifestFunction · 0.85
PutManifestMethod · 0.85

Calls 2

TagMethod · 0.45
DigestMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…