docs: Fix querify example

This commit is contained in:
madhead 2016-12-14 05:01:11 -05:00 committed by Bjørn Erik Pedersen
parent 7862de91de
commit e4ebe0d5bf

View file

@ -893,9 +893,9 @@ e.g. `<a href="/tags/{{ . | urlize }}">{{ . }}</a>`
### querify
Takes a set of key-value pairs and returns a [`url.Values`](https://godoc.org/net/url#Values) object. The [`Encode`](https://godoc.org/net/url#Values.Encode) method turns the pairs into a [query string](https://en.wikipedia.org/wiki/Query_string) that can be appended to a url. E.g.
Takes a set of key-value pairs and returns a [query string](https://en.wikipedia.org/wiki/Query_string) that can be appended to a URL. E.g.
<a href="https://www.google.com?{{ (querify "q" "test" "page" 3).Encode | safeHTML }}">Search</a>
<a href="https://www.google.com?{{ (querify "q" "test" "page" 3) | safeURL }}">Search</a>
will be rendered as