package
0.0.0-20160716142520-798504f34ace
Repository: https://github.com/dmitriymv/context.git
Documentation: pkg.go.dev
# Functions
GetRequest returns the http request in the given context.
GetRequestID attempts to resolve the current request id, if possible.
GetRequestLogger returns a logger that contains fields from the request in the current context.
GetResponseLogger reads the current response stats and builds a logger.
GetResponseWriter returns the http.ResponseWriter from the provided context.
RemoteAddr extracts the remote address of the request, taking into account proxy headers.
RemoteIP extracts the remote IP of the request, taking into account proxy headers.
WithRequest places the request on the context.
WithResponseWriter returns a new context and response writer that makes interesting response statistics available within the context.
WithVars extracts gorilla/mux vars and makes them available on the returned context.
# Variables
Common errors used with this package.
Common errors used with this package.