Categorygithub.com/tbistr/pig
modulepackage
0.9.1
Repository: https://github.com/tbistr/pig.git
Documentation: pkg.go.dev

# README

pig

Traverse and find HTML nodes. Based on std library's *html.Node, add extension methods to it.

# Functions

And returns a Match that returns AND of the given Matches.
Atom returns a Match that returns true if the given node's atom is the given atom.
Cls returns a Match that returns true if the given node has the given class.
HasAttr returns a Match that returns true if the given node has the given attribute.
HasAttrVal returns a Match that returns true if the given node has the given attribute and the attribute's value is the given value.
ID returns a Match that returns true if the given node has the given id.
MakeTree makes a new root node and appends given nodes as its children.
Map returns a slice of the results of applying the function f to each node in the node's children.
NewRoot returns a new root node.
Or returns a Match that returns OR of the given Matches.
Parse parses HTML from io.Reader.
ParseB parses HTML from []byte.
ParseS parses HTML from string.
Tag returns a Match that returns true if the given node's tag is the given tag.

# Structs

Node is a wrapper of html.Node.

# Type aliases

No description provided by the author