Gopher
FUNCTIONS

urls.Parse

Parse parses a given url, which may be relative or absolute, into a URL structure.

Syntax

urls.Parse URL

urls.Parse takes a url as input

{{ $url := urls.Parse "http://www.gohugo.io" }}

and returns a URL structure. The struct fields are accessed via the . notation:

{{ $url.Scheme }} → "http"
{{ $url.Host }} → "www.gohugo.io"