mirror of https://github.com/golang/go.git
http docfix: context.WithValue -> Context.Value
This commit is contained in:
parent
78f6856ddf
commit
05bc3acf82
|
|
@ -231,13 +231,13 @@ type CloseNotifier interface {
|
|||
|
||||
var (
|
||||
// ServerContextKey is a context key. It can be used in HTTP
|
||||
// handlers with context.WithValue to access the server that
|
||||
// handlers with Context.Value to access the server that
|
||||
// started the handler. The associated value will be of
|
||||
// type *Server.
|
||||
ServerContextKey = &contextKey{"http-server"}
|
||||
|
||||
// LocalAddrContextKey is a context key. It can be used in
|
||||
// HTTP handlers with context.WithValue to access the local
|
||||
// HTTP handlers with Context.Value to access the local
|
||||
// address the connection arrived on.
|
||||
// The associated value will be of type net.Addr.
|
||||
LocalAddrContextKey = &contextKey{"local-addr"}
|
||||
|
|
|
|||
Loading…
Reference in New Issue