gophish: github.com/gophish/gophish/context Index | Files

package context

import "github.com/gophish/gophish/context"

Package context provides the ability to store request-scoped values on an http.Request instance. These values are cleared after every request. This package was created due to Go v1.7 moving the context package into the stdlib, which had a net effect of breaking some functionality from the existing gorilla/context.

Index

Package Files

context.go doc.go

func Clear Uses

func Clear(r *http.Request)

Clear is a null operation, since this is handled automatically in Go > 1.7

func Get Uses

func Get(r *http.Request, key interface{}) interface{}

Get retrieves a value from the request context

func Set Uses

func Set(r *http.Request, key, val interface{}) *http.Request

Set stores a value on the request context

Package context imports 2 packages (graph) and is imported by 24 packages. Updated 2020-05-26. Refresh now. Tools for package owners.