Package-Level Functions (total 15, in which 10 are exported)
Dump returns a Checker that always returns nil, and as a side-effect writes a
human-readable description of n's subtree to standard output. It is useful
for debugging.
HasAttr returns a Checker that checks for an attribute with the given name whose
value matches the given regular expression.
HasAttr panics if wantValRegexp does not compile.
HasExactText returns a checker that checks whether the given string matches
the node's text exactly.
HasExactTextCollapsed returns a checker that checks whether the given string
matches the node's text with its leading, trailing, and redundant whitespace
trimmed.
HasHref returns a Checker that checks whether the node has an "href"
attribute with exactly val.
HasText returns a Checker that checks whether the given regexp matches the node's text.
The text of a node n is the concatenated contents of all text nodes in n's subtree.
HasText panics if the argument doesn't compile.
In returns a Checker that applies the given checkers to the first node
matching the CSS selector. The empty selector denotes the entire subtree of
the Checker's argument node.
Calling In(selector), with no checkers, just checks for the presence of
a node matching the selector. (For the negation, see NotIn.)
A nil Checker is valid and always succeeds.
InAll runs the checkers against all nodes matching selector.
NotIn returns a checker that succeeds only if no nodes match selector.
Run is a convenience function to run the checker against HTML read from
reader.
mustParseSelector parses the given CSS selector. An empty string
is treated as "*" (match everything).
nodeText appends the text of n's subtree to b. This is the concatenated
contents of all text nodes, visited depth-first.
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.