Ensure we don't break the middleware/extensions examples. (#537)

* Ensure we don't break the middleware/extensions examples.

* Fixed bug, just like this PR is meant to do. :)
This commit is contained in:
Travis Reeder
2017-02-20 12:26:37 -08:00
committed by GitHub
parent 025208a9de
commit 59188da3ae
2 changed files with 5 additions and 1 deletions

View File

@@ -33,6 +33,10 @@ test:
pwd: $GO_PROJECT pwd: $GO_PROJECT
- make test-datastore: - make test-datastore:
pwd: $GO_PROJECT pwd: $GO_PROJECT
- go build:
pwd: $GO_PROJECT/examples/middleware
- go build:
pwd: $GO_PROJECT/examples/extensions
deployment: deployment:
release: release:

View File

@@ -16,7 +16,7 @@ import (
func main() { func main() {
ctx := context.Background() ctx := context.Background()
funcServer := server.NewEnv(ctx) funcServer := server.NewFromEnv(ctx)
funcServer.AddMiddlewareFunc(func(ctx server.MiddlewareContext, w http.ResponseWriter, r *http.Request, app *models.App) error { funcServer.AddMiddlewareFunc(func(ctx server.MiddlewareContext, w http.ResponseWriter, r *http.Request, app *models.App) error {
start := time.Now() start := time.Now()