Skip to content

Commit

Permalink
refactor: remove flush method since it is not too much useful at rout…
Browse files Browse the repository at this point in the history
…er level. User can do: router.Layer.Flush()
  • Loading branch information
h2non committed Apr 2, 2016
1 parent e35faf2 commit 71b7414
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions route.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@ func (r *Route) UsePhase(phase string, handler interface{}) *Route {
return r
}

// Flush flushes all the router middleware stack.
// Use this method if you want to
func (r *Route) Flush() {
r.Layer.Flush()
}

// ServeHTTP handlers the incoming request and implemented the vinxi specific handler interface.
func (r *Route) ServeHTTP(w http.ResponseWriter, req *http.Request) {
r.Layer.Run(layer.RequestPhase, w, req, r.Handler)
Expand Down
6 changes: 0 additions & 6 deletions router.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,3 @@ func (r *Router) UseFinalHandler(fn http.Handler) *Router {
r.Layer.UseFinalHandler(fn)
return r
}

// Flush flushes all the router middleware stack.
// Use this method if you want to
func (r *Router) Flush() {
r.Layer.Flush()
}

0 comments on commit 71b7414

Please sign in to comment.