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

Function nerdctlIDLabels

pkg/netutil/netutil.go:540–550  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

538}
539
540func nerdctlIDLabels(b []byte) (*string, *map[string]string) {
541 type idLabels struct {
542 ID *string `json:"nerdctlID,omitempty"`
543 Labels *map[string]string `json:"nerdctlLabels,omitempty"`
544 }
545 var idl idLabels
546 if err := json.Unmarshal(b, &idl); err != nil {
547 return nil, nil
548 }
549 return idl.ID, idl.Labels
550}
551
552func networkID(name string) string {
553 hash := sha256.Sum256([]byte(name))

Callers 1

cniLoadFunction · 0.85

Calls 1

UnmarshalMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…