tangs b030ce89ca openbilibili | %!s(int64=5) %!d(string=hai) anos | |
---|---|---|
.. | ||
BUILD | %!s(int64=5) %!d(string=hai) anos | |
LICENSE | %!s(int64=5) %!d(string=hai) anos | |
README.md | %!s(int64=5) %!d(string=hai) anos | |
context.go | %!s(int64=5) %!d(string=hai) anos | |
doc.go | %!s(int64=5) %!d(string=hai) anos |
gorilla/context is a general purpose registry for global request variables.
Note: gorilla/context, having been born well before
context.Context
existed, does not play well with the shallow copying of the request thathttp.Request.WithContext
(added to net/http Go 1.7 onwards) performs. You should either use just gorilla/context, or moving forward, the newhttp.Request.Context()
.
Read the full documentation here: https://www.gorillatoolkit.org/pkg/context