package module
Version: v0.0.0-...-70c906f Latest Latest

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

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




This section is empty.


This section is empty.


func Split

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

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


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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL