mirror of
https://github.com/kataras/iris.git
synced 2026-03-08 09:25:58 +00:00
add 'Configuration.PathIntelligence' and 'OnErrorCode' and 'OnAnyErrorCode' on APIContainer
Former-commit-id: bc3d0232106622063205f326bfa4ed3aa84179de
This commit is contained in:
@@ -351,7 +351,7 @@ type Context interface {
|
||||
// this request based on subdomain and request path.
|
||||
//
|
||||
// Order may change.
|
||||
// Example: https://github.com/kataras/iris/tree/master/_examples/routing/not-found-suggests
|
||||
// Example: https://github.com/kataras/iris/tree/master/_examples/routing/intelligence/manual
|
||||
FindClosest(n int) []string
|
||||
// IsWWW returns true if the current subdomain (if any) is www.
|
||||
IsWWW() bool
|
||||
@@ -1812,7 +1812,7 @@ func (ctx *context) Subdomain() (subdomain string) {
|
||||
// this request based on subdomain and request path.
|
||||
//
|
||||
// Order may change.
|
||||
// Example: https://github.com/kataras/iris/tree/master/_examples/routing/not-found-suggests
|
||||
// Example: https://github.com/kataras/iris/tree/master/_examples/routing/intelligence/manual
|
||||
func (ctx *context) FindClosest(n int) []string {
|
||||
return ctx.Application().FindClosestPaths(ctx.Subdomain(), ctx.Path(), n)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user