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:
@@ -60,4 +60,8 @@ type Application interface {
|
||||
// RouteExists reports whether a particular route exists
|
||||
// It will search from the current subdomain of context's host, if not inside the root domain.
|
||||
RouteExists(ctx Context, method, path string) bool
|
||||
// FindClosestPaths returns a list of "n" paths close to "path" under the given "subdomain".
|
||||
//
|
||||
// Order may change.
|
||||
FindClosestPaths(subdomain, searchPath string, n int) []string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user