earl

package module
v0.0.0-...-70c906f Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2016 License: MIT Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Split

func Split(url string) (string, string, string, string)

Split splits an URL in to its major components (scheme, opaque, query, fragment)

Types

type URL

type URL struct {
	Input string

	Scheme   string
	Opaque   string
	Query    string
	Fragment string

	// Elements of Opaque
	Authority string
	Path      string

	// Elements of Authority
	UserInfo string
	Host     string
	Port     string
}

URL represents state for a parsed URL URL = scheme://opaque?query#fragment opaque = userinfo@host:port/path

func Parse

func Parse(url string) *URL

Parse splits an URL in to as many parts as it can

func ParseWithDefaults

func ParseWithDefaults(input string, defaults *URL) *URL

func (*URL) HostAndPort

func (u *URL) HostAndPort() string

func (*URL) Normalize

func (u *URL) Normalize() *URL

Normalize is intended to produce an expanded and valid URL representation It is presently incomplete (also read not even started).

func (*URL) ToNetURL

func (u *URL) ToNetURL() *url.URL

ToNetURL converts an earl.URL in to a net/url.URL

Jump to

Keyboard shortcuts

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