Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5494)

Unified Diff: appengine/cmd/logdog_coordinator/backend/main.go

Issue 2043423004: Make HTTP middleware easier to use (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: gaemiddleware: add middleware func for WithProd Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/cmd/helloworld_mvm/frontend/main.go ('k') | appengine/cmd/logdog_coordinator/services/main.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/cmd/logdog_coordinator/backend/main.go
diff --git a/appengine/cmd/logdog_coordinator/backend/main.go b/appengine/cmd/logdog_coordinator/backend/main.go
index 323ebdfad58a30cbeb2839411860e8f320853223..04122a24c599cd926c06617af1bda6ba20dc2d93 100644
--- a/appengine/cmd/logdog_coordinator/backend/main.go
+++ b/appengine/cmd/logdog_coordinator/backend/main.go
@@ -2,36 +2,36 @@
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
package module
import (
"net/http"
"golang.org/x/net/context"
- "github.com/julienschmidt/httprouter"
"github.com/luci/luci-go/appengine/logdog/coordinator"
"github.com/luci/luci-go/appengine/logdog/coordinator/config"
"github.com/luci/luci-go/appengine/tumble"
+ "github.com/luci/luci-go/server/router"
// Include mutations package so its Mutations will register with tumble via
// init().
_ "github.com/luci/luci-go/appengine/logdog/coordinator/mutations"
)
func init() {
tmb := tumble.Service{
Middleware: func(c context.Context) context.Context {
if err := config.UseConfig(&c); err != nil {
panic(err)
}
c = coordinator.UseProdServices(c)
return c
},
}
- router := httprouter.New()
- tmb.InstallHandlers(router)
+ r := router.New()
+ tmb.InstallHandlers(r)
- http.Handle("/", router)
+ http.Handle("/", r)
}
« no previous file with comments | « appengine/cmd/helloworld_mvm/frontend/main.go ('k') | appengine/cmd/logdog_coordinator/services/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698