streamline wordings

This commit is contained in:
Cole Garien 2025-09-13 12:48:53 -05:00
parent 56082672be
commit acc9a9c333
2 changed files with 7 additions and 11 deletions

View file

@ -91,7 +91,7 @@ var sentinelHandler Handler = &noopHandler{}
// trailing slash) are not. // trailing slash) are not.
// //
// AddInsecureBypassPattern panics if the pattern conflicts with one already // AddInsecureBypassPattern panics if the pattern conflicts with one already
// bypassed, or if the pattern is syntactically invalid (for example, an // registered, or if the pattern is syntactically invalid (for example, an
// improperly formed wildcard). // improperly formed wildcard).
// //
// AddInsecureBypassPattern can be called concurrently with other methods or // AddInsecureBypassPattern can be called concurrently with other methods or

View file

@ -2868,12 +2868,10 @@ func (mux *ServeMux) ServeHTTP(w ResponseWriter, r *Request) {
// always refers to user code. // always refers to user code.
// Handle registers the handler for the given pattern. // Handle registers the handler for the given pattern.
// If the given pattern conflicts with one that is already registered
// or if the pattern is invalid, Handle panics.
// //
// Handle panics if the pattern conflicts with one already registered // See [ServeMux] for details on valid patterns and conflict rules.
// or if the pattern is syntactically invalid (for example, an
// improperly formed wildcard).
//
// For details on valid patterns and conflict rules, see [ServeMux].
func (mux *ServeMux) Handle(pattern string, handler Handler) { func (mux *ServeMux) Handle(pattern string, handler Handler) {
if use121 { if use121 {
mux.mux121.handle(pattern, handler) mux.mux121.handle(pattern, handler)
@ -2883,12 +2881,10 @@ func (mux *ServeMux) Handle(pattern string, handler Handler) {
} }
// HandleFunc registers the handler function for the given pattern. // HandleFunc registers the handler function for the given pattern.
// If the given pattern conflicts with one that is already registered
// or if the pattern is invalid, HandleFunc panics.
// //
// HandleFunc panics if the pattern conflicts with one already // See [ServeMux] for details on valid patterns and conflict rules.
// registered or if the pattern is syntactically invalid (for example,
// an improperly formed wildcard).
//
// For details on valid patterns and conflict rules, see [ServeMux].
func (mux *ServeMux) HandleFunc(pattern string, handler func(ResponseWriter, *Request)) { func (mux *ServeMux) HandleFunc(pattern string, handler func(ResponseWriter, *Request)) {
if use121 { if use121 {
mux.mux121.handleFunc(pattern, handler) mux.mux121.handleFunc(pattern, handler)