Standard library / text/template
text/template.URLQueryEscaper()
Formats and URL-query-escapes arguments; not validation of a complete URL. Expected stdout: 'a+b%26c\n'.
Formal Syntax & Structure
go syntaxgo
func URLQueryEscaper(args ...any) stringParameters & Attributes
| Name | Type | Description |
|---|---|---|
| args | ...any | Values formatted before escaping. |
Return Value
string
Formats and URL-query-escapes arguments; not validation of a complete URL.
Working Example
Example Snippetgo
package main
import ( "fmt" "text/template")
func main() { fmt.Println(template.URLQueryEscaper("a b&c")) }