From 03fc2330e2ae568eafeb4d2e25e3f3535491062a Mon Sep 17 00:00:00 2001 From: Mateusz Poliwczak Date: Thu, 23 Feb 2023 19:58:13 +0100 Subject: [PATCH] update --- src/net/url/url.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/net/url/url.go b/src/net/url/url.go index 182c4a99f6..9ffd858a86 100644 --- a/src/net/url/url.go +++ b/src/net/url/url.go @@ -883,10 +883,11 @@ type Values map[string][]string // the empty string. To access multiple values, use the map // directly. func (v Values) Get(key string) string { - if vs := v[key]; len(vs) != 0 { - return vs[0] + vs := v[key] + if len(vs) == 0 { + return "" } - return "" + return vs[0] } // Set sets the key to value. It replaces any existing