MCPcopy Create free account
hub / github.com/dagger/dagger / DecodeInput

Method DecodeInput

dagql/nullables.go:210–226  ·  view source on GitHub ↗
(val any)

Source from the content-addressed store, hash-verified

208var _ InputDecoder = DynamicOptional{}
209
210func (o DynamicOptional) DecodeInput(val any) (Input, error) {
211 if val == nil {
212 return DynamicOptional{
213 Elem: o.Elem,
214 Valid: false,
215 }, nil
216 }
217 input, err := o.Elem.Decoder().DecodeInput(val)
218 if err != nil {
219 return nil, err
220 }
221 return DynamicOptional{
222 Elem: o.Elem,
223 Value: input,
224 Valid: true,
225 }, nil
226}
227
228var _ Setter = DynamicOptional{}
229

Callers

nothing calls this directly

Calls 2

DecodeInputMethod · 0.65
DecoderMethod · 0.65

Tested by

no test coverage detected