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

Method String

internal/image/process.go:107–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105}
106
107func (i *ImageReference) String() string {
108 // An image reference has at most 3 parts (repo, tag, digest) plus 2 separators
109 parts := make([]string, 0, 5)
110 parts = append(parts, i.Repository)
111 if i.Tag != "" {
112 parts = append(parts, ":", i.Tag)
113 }
114 if i.Digest != "" {
115 parts = append(parts, "@", i.Digest)
116 }
117 return strings.Join(parts, "")
118}
119
120// NewImageReference returns an ImageReference instance based on the given url.
121func NewImageReference(url string, opts ...name.Option) (*ImageReference, error) {

Callers 7

TestParseAndResolveAllFunction · 0.45
TestImageReferenceStringFunction · 0.45
TestImageReferenceRefFunction · 0.45
resolveAndSetImageUrlFunction · 0.45
resolveDigestMethod · 0.45
withImageConfigFunction · 0.45
CapabilitiesPathMethod · 0.45

Calls

no outgoing calls

Tested by 5

TestParseAndResolveAllFunction · 0.36
TestImageReferenceStringFunction · 0.36
TestImageReferenceRefFunction · 0.36
withImageConfigFunction · 0.36
CapabilitiesPathMethod · 0.36