Skip to content

Commit 6adc364

Browse files
committed
1 parent 36b45bc commit 6adc364

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/net/http/request.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,12 +1487,11 @@ func (r *Request) PathValue(name string) string {
14871487
func (r *Request) SetPathValue(name, value string) {
14881488
if i := r.patIndex(name); i >= 0 {
14891489
r.matches[i] = value
1490-
} else {
1491-
if r.otherValues == nil {
1492-
r.otherValues = map[string]string{}
1493-
}
1494-
r.otherValues[name] = value
14951490
}
1491+
if r.otherValues == nil {
1492+
r.otherValues = map[string]string{}
1493+
}
1494+
r.otherValues[name] = value
14961495
}
14971496

14981497
// patIndex returns the index of name in the list of named wildcards of the

0 commit comments

Comments
 (0)