(n *Node, out reflect.Value)
| 531 | } |
| 532 | |
| 533 | func (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 | |
| 546 | var zeroValue reflect.Value |
| 547 |