mirror of
https://github.com/golang/go
synced 2024-10-03 15:21:22 -06:00
http: add pointer from Handle[Func] to ServeMux docs
R=r CC=golang-dev https://golang.org/cl/4169065
This commit is contained in:
parent
1f39ed8a2d
commit
1e73fed888
@ -657,10 +657,12 @@ func (mux *ServeMux) HandleFunc(pattern string, handler func(ResponseWriter, *Re
|
|||||||
|
|
||||||
// Handle registers the handler for the given pattern
|
// Handle registers the handler for the given pattern
|
||||||
// in the DefaultServeMux.
|
// in the DefaultServeMux.
|
||||||
|
// The documentation for ServeMux explains how patterns are matched.
|
||||||
func Handle(pattern string, handler Handler) { DefaultServeMux.Handle(pattern, handler) }
|
func Handle(pattern string, handler Handler) { DefaultServeMux.Handle(pattern, handler) }
|
||||||
|
|
||||||
// HandleFunc registers the handler function for the given pattern
|
// HandleFunc registers the handler function for the given pattern
|
||||||
// in the DefaultServeMux.
|
// in the DefaultServeMux.
|
||||||
|
// The documentation for ServeMux explains how patterns are matched.
|
||||||
func HandleFunc(pattern string, handler func(ResponseWriter, *Request)) {
|
func HandleFunc(pattern string, handler func(ResponseWriter, *Request)) {
|
||||||
DefaultServeMux.HandleFunc(pattern, handler)
|
DefaultServeMux.HandleFunc(pattern, handler)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user