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

Method alias

decode.go:533–544  ·  view source on GitHub ↗
(n *Node, out reflect.Value)

Source from the content-addressed store, hash-verified

531}
532
533func (d *decoder) alias(n *Node, out reflect.Value) (good bool) {
534 if d.aliases[n] {
535 // TODO this could actually be allowed in some circumstances.
536 failf("anchor '%s' value contains itself", n.Value)
537 }
538 d.aliases[n] = true
539 d.aliasDepth++
540 good = d.unmarshal(n.Alias, out)
541 d.aliasDepth--
542 delete(d.aliases, n)
543 return good
544}
545
546var zeroValue reflect.Value
547

Callers 1

unmarshalMethod · 0.95

Calls 2

unmarshalMethod · 0.95
failfFunction · 0.85

Tested by

no test coverage detected