context

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear(r *http.Request)

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

func Get

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

Get retrieves a value from the request context

func Set

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

Set stores a value on the request context

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL