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

Unified Diff: common/prpc/talk/buildbot/frontend/handler.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/tumble/tumbletest.go ('k') | common/prpc/talk/buildbot/frontend/prpc.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/prpc/talk/buildbot/frontend/handler.go
diff --git a/common/prpc/talk/buildbot/frontend/handler.go b/common/prpc/talk/buildbot/frontend/handler.go
index cf4b22b55497285ddbd81cea365de4252cf007f9..c5100fb4952459f9a4717ef2cd1a1d9f6327ed5f 100644
--- a/common/prpc/talk/buildbot/frontend/handler.go
+++ b/common/prpc/talk/buildbot/frontend/handler.go
@@ -1,22 +1,21 @@
// Copyright 2015 The LUCI Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
package buildbot
import (
"net/http"
- "github.com/julienschmidt/httprouter"
-
"github.com/luci/luci-go/appengine/gaemiddleware"
+ "github.com/luci/luci-go/server/router"
)
func init() {
- router := httprouter.New()
- gaemiddleware.InstallHandlers(router, gaemiddleware.BaseProd)
-
- InstallAPIRoutes(router, gaemiddleware.BaseProd)
+ r := router.New()
+ basemw := gaemiddleware.BaseProd()
- http.DefaultServeMux.Handle("/", router)
+ gaemiddleware.InstallHandlers(r, basemw)
+ InstallAPIRoutes(r, basemw)
+ http.DefaultServeMux.Handle("/", r)
}
« no previous file with comments | « appengine/tumble/tumbletest.go ('k') | common/prpc/talk/buildbot/frontend/prpc.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698