MCPcopy
hub / github.com/go-yaml/yaml / callUnmarshaler

Method callUnmarshaler

decode.go:365–375  ·  view source on GitHub ↗
(n *Node, u Unmarshaler)

Source from the content-addressed store, hash-verified

363}
364
365func (d *decoder) callUnmarshaler(n *Node, u Unmarshaler) (good bool) {
366 err := u.UnmarshalYAML(n)
367 if e, ok := err.(*TypeError); ok {
368 d.terrors = append(d.terrors, e.Errors...)
369 return false
370 }
371 if err != nil {
372 fail(err)
373 }
374 return true
375}
376
377func (d *decoder) callObsoleteUnmarshaler(n *Node, u obsoleteUnmarshaler) (good bool) {
378 terrlen := len(d.terrors)

Callers 1

prepareMethod · 0.95

Calls 2

failFunction · 0.85
UnmarshalYAMLMethod · 0.65

Tested by

no test coverage detected