html

package module
v0.0.0-...-e0b3168 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

README

html

A series of wrappers in Go for handling html

Documentation

Overview

Package html contains wrapper functions for handling html.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(page io.Reader) (*html.Node, error)

Read and parse a web page.

Types

type Attributes

type Attributes map[string]string

Attributes is a series of attributes inside a tag.

type Constraints

type Constraints map[string]*regexp.Regexp

Constraints is a series of specific attributes we're looking for inside a tag.

type Tag

type Tag struct {
	Tag        string
	Attributes Attributes
	Node       *html.Node
}

Tag is a structure representing tags and all attributes.

func Find

func Find(node *html.Node, tag string, constraints *Constraints) []Tag

Find all tags starting at the given node subject to the constraints.

Jump to

Keyboard shortcuts

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