Skip to content

Commit 05bc3ac

Browse files
http docfix: context.WithValue -> Context.Value
1 parent 78f6856 commit 05bc3ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/net/http/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,13 @@ type CloseNotifier interface {
231231

232232
var (
233233
// ServerContextKey is a context key. It can be used in HTTP
234-
// handlers with context.WithValue to access the server that
234+
// handlers with Context.Value to access the server that
235235
// started the handler. The associated value will be of
236236
// type *Server.
237237
ServerContextKey = &contextKey{"http-server"}
238238

239239
// LocalAddrContextKey is a context key. It can be used in
240-
// HTTP handlers with context.WithValue to access the local
240+
// HTTP handlers with Context.Value to access the local
241241
// address the connection arrived on.
242242
// The associated value will be of type net.Addr.
243243
LocalAddrContextKey = &contextKey{"local-addr"}

0 commit comments

Comments
 (0)