cond

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2023 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttrValByRegex

func AttrValByRegex(nodes *[]*html.Node, namespace, key string, val *regexp.Regexp) func(n *html.Node) bool

Returns a function that collects all nodes who have an attribute that matches key and where its value matches the regex val.

func MatchAttrs

func MatchAttrs(nodes *[]*html.Node, first bool, attr ...html.Attribute) func(*html.Node) bool

Returns a function that adds every given node to nodes if it contains all attributes specified in attr. If first is true, search will stop after first match.

func MatchClassNames

func MatchClassNames(nodes *[]*html.Node, first bool, name ...string) func(*html.Node) bool

func MatchTag

func MatchTag(nodes *[]*html.Node, first bool, tag ...atom.Atom) func(*html.Node) bool

func TagFilter

func TagFilter(tag atom.Atom, f func(*html.Node) bool) func(*html.Node) bool

func TypeFilter

func TypeFilter(t html.NodeType, f func(*html.Node) bool) func(*html.Node) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL