Documentation ¶
Index ¶
- func AttrVal(attr []html.Attribute, key string) (val string, ok bool)
- func HasAttr(attr []html.Attribute, key string) (ok bool)
- func HasAttrVal(attr []html.Attribute, key, val string) bool
- func HasAttrWord(attr []html.Attribute, key, word string) bool
- type Finder
- func (f Finder) AttrVal(key string) (val string, ok bool)
- func (f Finder) ClassList() (classes []string, ok bool)
- func (f Finder) Find(pred FinderPredicate) (r Finder)
- func (f Finder) FindByAttr(attr, val string) Finder
- func (f Finder) FindByClass(class string) Finder
- func (f Finder) FindById(id string) Finder
- func (f Finder) FindElement(element atom.Atom) Finder
- func (f Finder) FindSibling(pred FinderPredicate) (r Finder)
- func (f Finder) FindSiblingByAttr(attr, val string) Finder
- func (f Finder) FindSiblingByClass(class string) Finder
- func (f Finder) FindSiblingById(id string) Finder
- func (f Finder) FindSiblingElement(element atom.Atom) Finder
- func (f Finder) FirstChild() Finder
- func (f Finder) HasAttr(key string) bool
- func (f Finder) HasAttrVal(key, val string) bool
- func (f Finder) HasAttrWord(key, word string) bool
- func (f Finder) HasClass(class string) bool
- func (f Finder) HasId(id string) bool
- func (f Finder) Id() (id string, ok bool)
- func (f Finder) IsEmpty() bool
- func (f Finder) NextSibling() Finder
- func (f Finder) String() string
- type FinderPredicate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Finder ¶
func FinderFromNode ¶
func FinderFromString ¶
func (Finder) Find ¶
func (f Finder) Find(pred FinderPredicate) (r Finder)
Find is universal finder. Includes current node in search.
func (Finder) FindByAttr ¶
func (Finder) FindByClass ¶
func (Finder) FindSibling ¶
func (f Finder) FindSibling(pred FinderPredicate) (r Finder)
FindSibling performs flat find among node's siblings. No recursion. Omits current node, starts from a first sibling.
func (Finder) FindSiblingByAttr ¶
func (Finder) FindSiblingByClass ¶
func (Finder) FindSiblingById ¶
func (Finder) FirstChild ¶
func (Finder) HasAttrVal ¶ added in v0.2.0
func (Finder) HasAttrWord ¶ added in v0.2.0
func (Finder) NextSibling ¶
type FinderPredicate ¶
Click to show internal directories.
Click to hide internal directories.