mirror of
https://github.com/PuerkitoBio/goquery.git
synced 2024-04-21 12:31:36 +00:00
19 lines
309 B
Go
19 lines
309 B
Go
package goquery
|
|
|
|
import (
|
|
"exp/html"
|
|
)
|
|
|
|
type Selection struct {
|
|
Nodes []*html.Node
|
|
document *Document
|
|
}
|
|
|
|
func newEmptySelection(doc *Document) *Selection {
|
|
return &Selection{nil, doc}
|
|
}
|
|
|
|
func newSingleSelection(node *html.Node, doc *Document) *Selection {
|
|
return &Selection{[]*html.Node{node}, doc}
|
|
}
|