Skip to content

Commit

Permalink
Merge pull request #108 from univedo/get-router
Browse files Browse the repository at this point in the history
Method to get instance of julienschmidt httprouter
  • Loading branch information
sharpner committed Apr 20, 2015
2 parents 60466ee + 6988f43 commit 9c36507
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -859,3 +859,8 @@ func handleError(err error, w http.ResponseWriter) {
func (api *API) Handler() http.Handler {
return api.router
}

// Router can be used instead of Handler() to get the instance of julienschmidt httprouter.
func (api *API) Router() *httprouter.Router {
return api.router
}

0 comments on commit 9c36507

Please sign in to comment.