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

Function FormatLabels

pkg/formatter/formatter.go:176–184  ·  view source on GitHub ↗
(labelMap map[string]string)

Source from the content-addressed store, hash-verified

174}
175
176func FormatLabels(labelMap map[string]string) string {
177 strs := make([]string, len(labelMap))
178 idx := 0
179 for i := range labelMap {
180 strs[idx] = fmt.Sprintf("%s=%s", i, labelMap[i])
181 idx++
182 }
183 return strings.Join(strs, ",")
184}
185
186// ToJSON return a string with the JSON representation of the interface{}
187// https://github.com/docker/compose/blob/v2/cmd/formatter/json.go#L31C4-L39

Callers 5

prepareContainersFunction · 0.92
ListFunction · 0.92
lsPrintOutputFunction · 0.92
preparePsTestContainerFunction · 0.92
preparePsTestContainerFunction · 0.92

Calls

no outgoing calls

Tested by 2

preparePsTestContainerFunction · 0.74
preparePsTestContainerFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…