match.go
func (p *Part) BreadthMatchFirst(matcher PartMatcher) *Part {
	q := list.New()
	q.PushBack(p)

	// Push children onto queue and attempt to match in that order
	for q.Len() > 0 {
		e := q.Front()
		p := e.Value.(*Part)
		if matcher(p) {
			return p
		}
		q.Remove(e)
		c := p.FirstChild
		for c != nil {
			q.PushBack(c)
			c = c.NextSibling
		}
	}

	return nil
}
func (p *Part) BreadthMatchFirst(matcher PartMatcher) *Part {
	q := list.New()
	q.PushBack(p)

	// Push children onto queue and attempt to match in that order
	for q.Len() > 0 {
		e := q.Front()
		p := e.Value.(*Part)
		if matcher(p) {
			return p
		}
		q.Remove(e)
		c := p.FirstChild
		for c != nil {
			q.PushBack(c)
			c = c.NextSibling
		}
	}

	return nil
}
// BreadthMatchFirst performs a breadth first search of the Part tree and returns the first part
// that causes the given matcher to return true