htmlutil

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attr

func Attr(node *html.Node, key string) (string, bool)

Attr returns the value of an attribute by key and whether or not it exists.

func Match

func Match(node *html.Node, matchFunc func(node *html.Node) bool) *html.Node

Match matches a node by performing a depth-first search.

Types

type MetaProperties

type MetaProperties map[string][]string

func ParseMetaProperties

func ParseMetaProperties(root *html.Node) (MetaProperties, error)

func (MetaProperties) Add

func (m MetaProperties) Add(key string, value string)

func (MetaProperties) Get

func (m MetaProperties) Get(key string) string

func (MetaProperties) Set

func (m MetaProperties) Set(key string, value string)

Jump to

Keyboard shortcuts

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