This commit is contained in:
Mateusz Poliwczak 2023-02-23 19:58:13 +01:00
parent 2578fd420e
commit 03fc2330e2
1 changed files with 4 additions and 3 deletions

View File

@ -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