Help us shape the future of Go! Take the 2026 Go Developer Survey

htmlfind

package
v0.3.1100 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(n *html.Node, f Matcher) (nodes []*html.Node)

All returns all nodes that match the given function.

func AllReader

func AllReader(r io.Reader, f Matcher) (nodes []*html.Node, err error)

AllReader returns all nodes that match the given function.

Types

type Attribute

type Attribute struct {
	Name, Value string
}

Attribute is a key-value pair for an HTML element.

func Attr

func Attr(name, value string) Attribute

Attr is a constructor for Attribute.

type Matcher

type Matcher func(*html.Node) bool

Matcher is a function that matches HTML nodes.

func Element

func Element(name string, attrs ...Attribute) Matcher

Element returns a Matcher that matches an HTML element with the given name and attributes.

Jump to

Keyboard shortcuts

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