Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #22 from InVisionApp/caledhwa-patch-1
Browse files Browse the repository at this point in the history
Fixing shadowed `handlers` parameter
  • Loading branch information
caledhwa authored Mar 9, 2017
2 parents 8011eb6 + 65a5420 commit 34336c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rye.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ func (m *MWHandler) Use(handler Handler) {

// The Handle function is the primary way to set up your chain of middlewares to be called by rye.
// It returns a http.HandlerFunc from net/http that can be set as a route in your http server.
func (m *MWHandler) Handle(handlers []Handler) http.Handler {
func (m *MWHandler) Handle(customHandlers []Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
handlers := append(m.beforeHandlers, handlers...)
handlers := append(m.beforeHandlers, customHandlers...)
for _, handler := range handlers {
var resp *Response

Expand Down

0 comments on commit 34336c1

Please sign in to comment.