Standard library / net/url
url.Values
Store multiple case-sensitive query values per key; initialize the map before adding values. Expected stdout: 'tag=go&tag=web\n'.
Formal Syntax & Structure
go syntaxgo
type Values map[string][]stringWorking Example
Example Snippetgo
package main
import ( "fmt" "net/url")
func main() { v := url.Values{}; v.Add("tag", "go"); v.Add("tag", "web"); fmt.Println(v.Encode()) }
func must[T any](v T, e error) T { if e != nil { panic(e) } return v}func check(e error) { if e != nil { panic(e) }}