webutils

package module
v0.0.0-...-0c1db29 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2017 License: MIT Imports: 8 Imported by: 0

README

WebUtils

This project is a work-in-progress. If there's something that can be re-used in web servers, it can go here.

A lot of refactoring is yet to be done, so use at own risk. No guarantees whatsoever, a lot may change.

Contribute?

Create an issue if you want to discuss. Pull Requests are always welcome.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttributeValue

func AttributeValue(node *html.Node, key string) string

func Btoi

func Btoi(b bool) int

func FindNodeWithId

func FindNodeWithId(node *html.Node, id string) *html.Node

func FindNodeWithName

func FindNodeWithName(node *html.Node, name string) *html.Node

func FromBytes

func FromBytes(b []byte, i interface{}) error

func Itob

func Itob(i int) bool

func JSArgs

func JSArgs(args ...interface{}) map[string]interface{}

func PanicOnError

func PanicOnError(err error)

func PrintPrettyHTMLNode

func PrintPrettyHTMLNode(node *html.Node) string

func RandomCrypto

func RandomCrypto(length int) (string, error)

func ToBytes

func ToBytes(i interface{}) ([]byte, error)

Types

type HtmlNode

type HtmlNode struct {
	*html.Node
}

func From

func From(n *html.Node) *HtmlNode

func (*HtmlNode) Tag

func (n *HtmlNode) Tag(tag string) (nodes HtmlNodes)

type HtmlNodes

type HtmlNodes []*HtmlNode

func (HtmlNodes) Tag

func (nodes HtmlNodes) Tag(tag string) HtmlNodes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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