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

Function formatRange

pkg/formatter/formatter.go:115–120  ·  view source on GitHub ↗
(startHost, endHost, startContainer, endContainer int32)

Source from the content-addressed store, hash-verified

113}
114
115func formatRange(startHost, endHost, startContainer, endContainer int32) string {
116 if startHost == endHost && startContainer == endContainer {
117 return fmt.Sprintf("%d->%d", startHost, startContainer)
118 }
119 return fmt.Sprintf("%d-%d->%d-%d", startHost, endHost, startContainer, endContainer)
120}
121
122func FormatPorts(ports []cni.PortMapping) string {
123 if len(ports) == 0 {

Callers 1

FormatPortsFunction · 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…