Middleware (#502)

* API endpoint extensions working.

extensions example.

extensions example.

* Added server.NewEnv and some docs for the API extensions example.

extensions example.

extensions example.

* Uncommented special handler stuff.

* First example of middleware.

easier to use.

* Added a special Middleware context to make middleware easier to use.

* Fix tests.

* Cleanup based on PR comments.
This commit is contained in:
Travis Reeder
2017-01-30 14:43:23 -08:00
committed by C Cirello
parent 37efa47bdf
commit ce26f665ea
10 changed files with 213 additions and 48 deletions

View File

@@ -10,7 +10,7 @@ func (h *testSpecialHandler) Handle(c HandlerContext) error {
}
func TestSpecialHandlerSet(t *testing.T) {
// temporarily commented until we figure out if we want this anymore
// todo: temporarily commented as we may remove special handlers
// ctx := context.Background()
// tasks := make(chan task.Request)