mirror of
https://github.com/gophish/gophish
synced 2024-11-14 00:07:19 +00:00
27 lines
381 B
Go
27 lines
381 B
Go
//go:build !go1.7
|
|
// +build !go1.7
|
|
|
|
package context
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gorilla/context"
|
|
)
|
|
|
|
func Get(r *http.Request, key interface{}) interface{} {
|
|
return context.Get(r, key)
|
|
}
|
|
|
|
func Set(r *http.Request, key, val interface{}) *http.Request {
|
|
if val == nil {
|
|
return r
|
|
}
|
|
|
|
context.Set(r, key, val)
|
|
return r
|
|
}
|
|
|
|
func Clear(r *http.Request) {
|
|
context.Clear(r)
|
|
}
|