Skip to content

Document selectors (issue?) #11

@azukaar

Description

@azukaar

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:

image

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?

image

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions