Documentation ¶
Overview ¶
Package urlz contains URL utility functionality.
Index ¶
- func QueryParamKeys(query string) (keys []string, err error)
- func RenameQueryParamKey(query, oldKey, newKey string) string
- func StripPath(u url.URL, stripQuery bool) string
- func StripQuery(u url.URL) string
- func StripScheme(u url.URL) string
- func StripSchemeAndUser(u url.URL) string
- func StripUser(u url.URL) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QueryParamKeys ¶
QueryParamKeys returns the keys of a URL query. This function exists because url.ParseQuery returns a url.Values, which is a map type, and the keys don't preserve order.
func RenameQueryParamKey ¶
RenameQueryParamKey renames all instances of oldKey in query to newKey, where query is a URL query string.
func StripPath ¶
StripPath strips the url's path. If stripQuery is true, the query is also stripped.
func StripSchemeAndUser ¶
StripSchemeAndUser removes the URL's scheme and user info.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.