html

package
v1.5.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAttr

func GetAttr(element *html.Node, attrName string) (string, bool)

func GetElementsByTagName

func GetElementsByTagName(root *html.Node, tagName string) []*html.Node

func NewRequestFromForm

func NewRequestFromForm(form *html.Node, currentURL *url.URL, filterFunc InputFilterFunc) (*http.Request, error)

NewRequestFromForm builds a request that simulates submitting the given form. It honors: Form method (defaults to GET) Form action (defaults to currentURL if missing, or currentURL's scheme/host if server-relative) Input values from <input name="..." value="..."> elements * only the first type="submit" input's value is included * only radio and checkbox inputs with the "checked" attribute are included

Types

type InputFilterFunc

type InputFilterFunc func(inputType, inputName, inputValue string) bool

Jump to

Keyboard shortcuts

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