MCPcopy Index your code
hub / github.com/dagger/dagger / UnmarshalJSON

Method UnmarshalJSON

sdk/python/runtime/image.go:78–92  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

76}
77
78func (i *Image) UnmarshalJSON(data []byte) error {
79 var ref string
80 if err := json.Unmarshal(data, &ref); err != nil {
81 return err
82 }
83 if ref == "" {
84 return nil
85 }
86 img, err := NewImage(ref)
87 if err != nil {
88 return err
89 }
90 i.named = img.named
91 return nil
92}
93
94// NewImage parses a string into a named reference transforming a familiar
95// name from Docker UI to a fully qualified reference.

Callers

nothing calls this directly

Calls 2

NewImageFunction · 0.85
UnmarshalMethod · 0.65

Tested by

no test coverage detected