Private constructor, make sure all fields are correctly filled.
(root *html.Node, url *url.URL)
| 87 | |
| 88 | // Private constructor, make sure all fields are correctly filled. |
| 89 | func newDocument(root *html.Node, url *url.URL) *Document { |
| 90 | // Create and fill the document |
| 91 | d := &Document{nil, url, root} |
| 92 | d.Selection = newSingleSelection(root, d) |
| 93 | return d |
| 94 | } |
| 95 | |
| 96 | // Selection represents a collection of nodes matching some criteria. The |
| 97 | // initial Selection can be created by using Document.Find, and then |
no test coverage detected
searching dependent graphs…