Skip to content
Branch: master
Find file Copy path
2 contributors

Users who have contributed to this file

@alimy @fharding1
19 lines (14 sloc) 315 Bytes
package mux
import (
func contextGet(r *http.Request, key interface{}) interface{} {
return r.Context().Value(key)
func contextSet(r *http.Request, key, val interface{}) *http.Request {
if val == nil {
return r
return r.WithContext(context.WithValue(r.Context(), key, val))
You can’t perform that action at this time.