mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 18:17:19 +00:00
go1.16 (#14783)
This commit is contained in:
2
vendor/github.com/go-chi/chi/middleware/value.go
generated
vendored
2
vendor/github.com/go-chi/chi/middleware/value.go
generated
vendored
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
// WithValue is a middleware that sets a given key/value in a context chain.
|
||||
func WithValue(key interface{}, val interface{}) func(next http.Handler) http.Handler {
|
||||
func WithValue(key, val interface{}) func(next http.Handler) http.Handler {
|
||||
return func(next http.Handler) http.Handler {
|
||||
fn := func(w http.ResponseWriter, r *http.Request) {
|
||||
r = r.WithContext(context.WithValue(r.Context(), key, val))
|
||||
|
Reference in New Issue
Block a user