goq
goq copied to clipboard
Document selectors (issue?)
I'm having an issue with selectors, and in general they're hard to deal with because they are not documented, neither here nor in GoQuery.
I have this markup:
And I select :
type Categorie struct {
Text string `goquery:"a,text"`
Link string `goquery:"a,[href]"`
Sub []Categorie `goquery:"ul"`
}
type Menu struct {
Categorie []Categorie `goquery:".menu-l1-li-hld li"`
}
I would expect text and href from links to return 1 of each, but I have a weird result where text append every sub text together, but href doesn't. Is it an issue with the lib?
Thanks