package tree import "github.com/miekg/dns" // Walk performs fn on all authoritative values stored in the tree in // in-order depth first. If a non-nil error is returned the Walk was interrupted // by an fn returning that error. If fn alters stored values' sort // relationships, future tree operation behaviors are undefined. func (t *Tree) Walk(fn func(*Elem, map[uint16][]dns.RR) error) error { if t.Root == nil { return nil } return t.Root.walk(fn) } func (n *Node) walk(fn func(*Elem, map[uint16][]dns.RR) error) error { if n.Left != nil { if err := n.Left.walk(fn); err != nil { return err } } if err := fn(n.Elem, n.Elem.m); err != nil { return err } if n.Right != nil { if err := n.Right.walk(fn); err != nil { return err } } return nil } value='1.3.0'>1.3.0 Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/examples/framework-lit (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-06-28Fix Tailwind integration Typescript warning (#3732)Gravatar Victor 2-1/+6
2022-06-27[ci] formatGravatar bholmesdev 2-3/+3
2022-06-27Refactor: remove Deno shim to esbuild "banner" (#3734)Gravatar Ben Holmes 7-15/+22
2022-06-27[ci] formatGravatar FredKSchott 9-23/+25
2022-06-27update telemetry to support more anonymized project id (#3713)Gravatar Fred K. Schott 20-351/+311
2022-06-27SImplify "astro add" by removing confusing multi-select (#3715)Gravatar Fred K. Schott 13-258/+157