aboutsummaryrefslogtreecommitdiff
path: root/src/net/http
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2024-09-27 13:46:56 -0400
committerJonathan Amsterdam <jba@google.com>2024-10-02 15:22:08 +0000
commit658a6a6e1f0a4e0a41ccb5618b0cbf9abe9a7ff4 (patch)
treeb00c9f59ba2db7fc84360d1ff196fb45d464c29d /src/net/http
parent1e338a2fe3b1462e583d57ce8fa6c6cc36af0ac7 (diff)
downloadgo-658a6a6e1f0a4e0a41ccb5618b0cbf9abe9a7ff4.tar.xz
src/net/http: remove ServeMux.patterns
Remove an unexported field from ServeMux that was there only to support some Google-internal packages. It is no longer needed. Change-Id: I6a4d542c6c016f5a9f3d24d0c73f6ddd44c9562e Reviewed-on: https://go-review.googlesource.com/c/go/+/616355 Reviewed-by: Chressie Himpel <chressie@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/net/http')
-rw-r--r--src/net/http/server.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/net/http/server.go b/src/net/http/server.go
index 0b56edf231..bd16eeb08e 100644
--- a/src/net/http/server.go
+++ b/src/net/http/server.go
@@ -2503,11 +2503,10 @@ func RedirectHandler(url string, code int) Handler {
// This change mostly affects how paths with %2F escapes adjacent to slashes are treated.
// See https://go.dev/issue/21955 for details.
type ServeMux struct {
- mu sync.RWMutex
- tree routingNode
- index routingIndex
- patterns []*pattern // TODO(jba): remove if possible
- mux121 serveMux121 // used only when GODEBUG=httpmuxgo121=1
+ mu sync.RWMutex
+ tree routingNode
+ index routingIndex
+ mux121 serveMux121 // used only when GODEBUG=httpmuxgo121=1
}
// NewServeMux allocates and returns a new [ServeMux].
@@ -2838,7 +2837,6 @@ func (mux *ServeMux) registerErr(patstr string, handler Handler) error {
}
mux.tree.addPattern(pat, handler)
mux.index.addPattern(pat)
- mux.patterns = append(mux.patterns, pat)
return nil
}