mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 03:17:04 +00:00
Add context.FindClosest(n) to find closest paths - useful for 404 pages to suggest valid pages
Former-commit-id: 90ff7c9da5369df5bd99fbbecf9955a8c555fea5
This commit is contained in:
@@ -31,6 +31,10 @@ type RouteReadOnly interface {
|
||||
// IsOnline returns true if the route is marked as "online" (state).
|
||||
IsOnline() bool
|
||||
|
||||
// IsStatic reports whether this route is a static route.
|
||||
// Does not contain dynamic path parameters,
|
||||
// is online and registered on GET HTTP Method.
|
||||
IsStatic() bool
|
||||
// StaticPath returns the static part of the original, registered route path.
|
||||
// if /user/{id} it will return /user
|
||||
// if /user/{id}/friend/{friendid:uint64} it will return /user too
|
||||
|
||||
Reference in New Issue
Block a user