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

Function normalizeReference

cli/command/manifest/util.go:59–68  ·  view source on GitHub ↗
(ref string)

Source from the content-addressed store, hash-verified

57}
58
59func normalizeReference(ref string) (reference.Named, error) {
60 namedRef, err := reference.ParseNormalizedNamed(ref)
61 if err != nil {
62 return nil, err
63 }
64 if _, isDigested := namedRef.(reference.Canonical); !isDigested {
65 return reference.TagNameOnly(namedRef), nil
66 }
67 return namedRef, nil
68}
69
70// getManifest from the local store, and fallback to the remote registry if it
71// doesn't exist locally

Callers 5

runPushFunction · 0.85
runInspectFunction · 0.85
createManifestListFunction · 0.85
runRemoveFunction · 0.85
runManifestAnnotateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…