mirror of
https://github.com/golang/go.git
synced 2025-10-19 11:03:18 +00:00
streamline wordings
This commit is contained in:
parent
56082672be
commit
acc9a9c333
2 changed files with 7 additions and 11 deletions
|
@ -91,7 +91,7 @@ var sentinelHandler Handler = &noopHandler{}
|
|||
// trailing slash) are not.
|
||||
//
|
||||
// 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).
|
||||
//
|
||||
// AddInsecureBypassPattern can be called concurrently with other methods or
|
||||
|
|
|
@ -2868,12 +2868,10 @@ func (mux *ServeMux) ServeHTTP(w ResponseWriter, r *Request) {
|
|||
// always refers to user code.
|
||||
|
||||
// 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
|
||||
// or if the pattern is syntactically invalid (for example, an
|
||||
// improperly formed wildcard).
|
||||
//
|
||||
// For details on valid patterns and conflict rules, see [ServeMux].
|
||||
// See [ServeMux] for details on valid patterns and conflict rules.
|
||||
func (mux *ServeMux) Handle(pattern string, handler Handler) {
|
||||
if use121 {
|
||||
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.
|
||||
// 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
|
||||
// registered or if the pattern is syntactically invalid (for example,
|
||||
// an improperly formed wildcard).
|
||||
//
|
||||
// For details on valid patterns and conflict rules, see [ServeMux].
|
||||
// See [ServeMux] for details on valid patterns and conflict rules.
|
||||
func (mux *ServeMux) HandleFunc(pattern string, handler func(ResponseWriter, *Request)) {
|
||||
if use121 {
|
||||
mux.mux121.handleFunc(pattern, handler)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue