Skip to content

Commit

Permalink
feat: remove Route.HandleWithMiddleware API as it's not clear for now…
Browse files Browse the repository at this point in the history
… how and when to use it.
  • Loading branch information
tigerwill90 committed Oct 6, 2024
1 parent d5d1d36 commit 81e05a2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fox.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func (f ClientIPStrategyFunc) ClientIP(c Context) (*net.IPAddr, error) {
}

// Route represent a registered route in the route tree.
// Most of the Route API is EXPERIMENTAL and is likely to change in future release.
type Route struct {
ipStrategy ClientIPStrategy
base HandlerFunc
Expand All @@ -83,11 +84,6 @@ func (r *Route) Handle(c Context) {
r.base(c)

Check warning on line 84 in fox.go

View check run for this annotation

Codecov / codecov/patch

fox.go#L83-L84

Added lines #L83 - L84 were not covered by tests
}

// HandleWithMiddleware calls the handler with applied middleware using the provided Context.
func (r *Route) HandleWithMiddleware(c Context) {
r.handler(c)
}

// Path returns the route path.
func (r *Route) Path() string {
return r.path
Expand Down

0 comments on commit 81e05a2

Please sign in to comment.