We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36b45bc commit 6adc364Copy full SHA for 6adc364
src/net/http/request.go
@@ -1487,12 +1487,11 @@ func (r *Request) PathValue(name string) string {
1487
func (r *Request) SetPathValue(name, value string) {
1488
if i := r.patIndex(name); i >= 0 {
1489
r.matches[i] = value
1490
- } else {
1491
- if r.otherValues == nil {
1492
- r.otherValues = map[string]string{}
1493
- }
1494
- r.otherValues[name] = value
1495
}
+ if r.otherValues == nil {
+ r.otherValues = map[string]string{}
+ }
+ r.otherValues[name] = value
1496
1497
1498
// patIndex returns the index of name in the list of named wildcards of the
0 commit comments