Adds before/after app get/list. And some bug fixes/cleanup. (#610)

* Adds before/after app get/list. And some bug fixes/cleanup.

* Fix test
This commit is contained in:
Travis Reeder
2017-12-21 09:32:03 -08:00
committed by GitHub
parent 0a1b180158
commit fdb4188146
26 changed files with 212 additions and 65 deletions

17
fnext/context.go Normal file
View File

@@ -0,0 +1,17 @@
package fnext
// good reading on this: https://twitter.com/sajma/status/757217773852487680
type contextKey string
// func (c contextKey) String() string {
// return "fnext context key " + string(c)
// }
// Keys for extensions to get things out of the context
var (
// MiddlewareControllerKey is a context key. It can be used in handlers with context.WithValue to
// access the MiddlewareContext.
MiddlewareControllerKey = contextKey("middleware_controller")
// AppNameKey
AppNameKey = contextKey("app_name")
)