package main import ( "fmt" "net/url" ) func main() { u, err := url.Parse("http://www.example.com/path") if err != nil { panic(err) } // Add query parameter q := u.Query() q.Add("key", "value") u.RawQuery = q.Encode() fmt.Println(u.String()) }This example demonstrates how to add a query parameter to a URL using the Values Add method. We first parse the URL "http://www.example.com/path" using the url.Parse function. We then retrieve the query parameters using the Query method and add a new key-value pair using the Add method. Finally, we encode the modified query parameters back into the URL and print the result.