MCPcopy Create free account
hub / github.com/containerd/nerdctl / String

Method String

pkg/referenceutil/referenceutil.go:73–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71}
72
73func (ir *ImageReference) String() string {
74 if ir.Protocol != "" && ir.Domain == "" {
75 return ir.Path
76 }
77 if ir.Path == "" && ir.Digest != "" {
78 return ir.Digest.String()
79 }
80 if ir.nn != nil {
81 return ir.nn.String()
82 }
83 return ""
84}
85
86func (ir *ImageReference) SuggestContainerName(suffix string) string {
87 name := "untitled"

Callers 3

SuggestContainerNameMethod · 0.95
decodeCidFunction · 0.45
TestReferenceUtilFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestReferenceUtilFunction · 0.36