MCPcopy
hub / github.com/containerd/containerd / ObjectWithLabelArgs

Function ObjectWithLabelArgs

cmd/ctr/commands/commands.go:235–242  ·  view source on GitHub ↗

ObjectWithLabelArgs returns the first arg and a LabelArgs object

(cliContext *cli.Context)

Source from the content-addressed store, hash-verified

233
234// ObjectWithLabelArgs returns the first arg and a LabelArgs object
235func ObjectWithLabelArgs(cliContext *cli.Context) (string, map[string]string) {
236 var (
237 first = cliContext.Args().First()
238 labelStrings = cliContext.Args().Tail()
239 )
240
241 return first, LabelArgs(labelStrings)
242}
243
244// LabelArgs returns a map of label key,value pairs
245func LabelArgs(labelStrings []string) map[string]string {

Callers 5

snapshots.goFile · 0.92
namespaces.goFile · 0.92
containers.goFile · 0.92
content.goFile · 0.92
images.goFile · 0.92

Calls 1

LabelArgsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…