Standard library / net/url
url.Values.Del()
Remove all values for a key. Expected stdout: 'false\n'.
Formal Syntax & Structure
go syntaxgo
func (v Values) Del(key string)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| key | string | Header or query parameter name. |
Working Example
Example Snippetgo
package main
import ( "fmt" "net/url")
func main() { v := url.Values{"a": {"1"}}; v.Del("a"); fmt.Println(v.Has("a")) }
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) }}