github.com/8samaka/gophish@v0.9.0/context/context-legacy.go (about)

     1  // +build !go1.7
     2  
     3  package context
     4  
     5  import (
     6  	"net/http"
     7  
     8  	"github.com/gorilla/context"
     9  )
    10  
    11  func Get(r *http.Request, key interface{}) interface{} {
    12  	return context.Get(r, key)
    13  }
    14  
    15  func Set(r *http.Request, key, val interface{}) *http.Request {
    16  	if val == nil {
    17  		return r
    18  	}
    19  
    20  	context.Set(r, key, val)
    21  	return r
    22  }
    23  
    24  func Clear(r *http.Request) {
    25  	context.Clear(r)
    26  }