github.com/rabbouni145/gg@v0.47.1/docs/content/en/functions/urls.Parse.md (about)

     1  ---
     2  title: urls.Parse
     3  description: Parse parses a given url, which may be relative or absolute, into a URL structure.
     4  godocref: https://godoc.org/net/url#URL
     5  date: 2017-09-25
     6  publishdate: 2017-09-25
     7  lastmod: 2017-09-25
     8  categories: [functions]
     9  menu:
    10    docs:
    11      parent: "functions"
    12  keywords: [urls]
    13  signature: ["urls.Parse URL"]
    14  workson: []
    15  hugoversion:
    16  deprecated: false
    17  aliases: []
    18  ---
    19  
    20  `urls.Parse` takes a url as input
    21  
    22  
    23  ```
    24  {{ $url := urls.Parse "http://www.gohugo.io" }}		
    25  ```
    26  
    27  and returns a [URL](https://godoc.org/net/url#URL) structure. The struct fields are accessed via the `.` notation:
    28  
    29  ```
    30  {{ $url.Scheme }} → "http"
    31  {{ $url.Host }} → "www.gohugo.io"
    32  ```