// findAtom finds the first occurrence of an ElementNode containing the class.
findAtom finds the first occurrence of an ElementNode containing the class.
// findAtom finds the first occurrence of an ElementNode containing the class .
func findClass(n *html.Node, t string) *html.Node {
	for c := n.FirstChild; c != nil; c = c.NextSibling {
		if c.Type == html.ElementNode {
			for _, a := range c.Attr {
				if a.Key == "class" && includes(a.Val, t) {
					return c
				}
			}
		}
		if m := findClass(c, t); m != nil {
			return m
		}
	}
	return nil
}
func findClass ( n * html . Node , t string ) * html . Node { for c := n . FirstChild ; c != nil ; c = c . NextSibling { if c . Type == html . ElementNode { for _ , a := range c . Attr { if a . Key == " " && includes ( a . Val , t ) { return c } } } if m := findClass ( c , t ) ; m != nil { return m } } return nil }
findAtom finds the first occurrence of an ElementNode containing the class.
findAtom finds the first occurrence of an ElementNode containing the class .