func extractAttrs(n *html.Node, entity *Entity, wg *sync.WaitGroup) {
	defer wg.Done()

	// loop through file types and their extensions to check for matches
	for j, p := range matchVals {
		if n.Type == html.ElementNode && n.Data == j {
			for i := range n.Attr {
				attr := &n.Attr[i]
				if attr.Key == p {
					matchAttrs(attr, entity)
				}
			}
		}
	}

	for c := n.FirstChild; c != nil; c = c.NextSibling {
		wg.Add(1)
		go extractAttrs(c, entity, wg)
	}
}
// Extract attributes on elements that match css/js/link tags.
Extract attributes on elements that match css/js/link tags.
// Extract attributes on elements that match css / js / link tags .
func extractAttrs(n *html.Node, entity *Entity, wg *sync.WaitGroup) {
	defer wg.Done()
	for j, p := range matchVals {
		if n.Type == html.ElementNode && n.Data == j {
			for i := range n.Attr {
				attr := &n.Attr[i]
				if attr.Key == p {
					matchAttrs(attr, entity)
				}
			}
		}
	}
	for c := n.FirstChild; c != nil; c = c.NextSibling {
		wg.Add(1)
		go extractAttrs(c, entity, wg)
	}
}
func extractAttrs ( n * html . Node , entity * Entity , wg * sync . WaitGroup ) { defer wg . Done ( ) for j , p := range matchVals { if n . Type == html . ElementNode && n . Data == j { for i := range n . Attr { attr := & n . Attr [ i ] if attr . Key == p { matchAttrs ( attr , entity ) } } } } for c := n . FirstChild ; c != nil ; c = c . NextSibling { wg . Add ( 1 ) go extractAttrs ( c , entity , wg ) } }
Extract attributes on elements that match css/js/link tags.
Extract attributes on elements that match css / js / link tags .
// loop through file types and their extensions to check for matches