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

Function parseContextNames

pkg/cmd/builder/build.go:570–583  ·  view source on GitHub ↗
(values []string)

Source from the content-addressed store, hash-verified

568}
569
570func parseContextNames(values []string) (map[string]string, error) {
571 if len(values) == 0 {
572 return nil, nil
573 }
574 result := make(map[string]string, len(values))
575 for _, value := range values {
576 kv := strings.SplitN(value, "=", 2)
577 if len(kv) != 2 {
578 return nil, fmt.Errorf("invalid context value: %s, expected key=value", value)
579 }
580 result[kv[0]] = kv[1]
581 }
582 return result, nil
583}
584
585var (
586 ErrOCILayoutPrefixNotFound = errors.New("OCI layout prefix not found")

Callers 1

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