Version: v0.0.0-...-576eb72 Latest Latest

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

Go to latest
Published: Dec 22, 2014 License: MPL-2.0 Imports: 2 Imported by: 0



Package urlutil contains utility functions related to URLs.



This section is empty.


This section is empty.


func AppendQuery

func AppendQuery(s string, query url.Values) string

AppendQuery appends the given query string as an url.Values to the given URL. It works correctly even if the URL already has a query string.

func IsURL

func IsURL(s string) bool

IsURL returns true iff s looks like a URL.

func Join

func Join(base string, rel string) (string, error)

Join returns the result of joining the base URL with the rel URL. If either base or rel are not valid URLs, an error will be returned.

func MustJoin

func MustJoin(base string, rel string) string

MustJoin works like Join, but panics if there's an error.

func SameHost

func SameHost(url1, url2 string) bool

SameHost returns true iff both URLs point to the same host. It works for both absolute and relative URLs.


This section is empty.

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