1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

add CustomPathWordFunc

This commit is contained in:
yale8848
2021-03-14 20:58:10 +08:00
parent 7272c76847
commit 8f3e6f7bbf
4 changed files with 53 additions and 6 deletions

View File

@@ -37,6 +37,9 @@ type Application struct {
// Disables verbose logging for controllers under this and its children mvc apps.
// Defaults to false.
controllersNoLog bool
// Set custom path
customPathWordFunc CustomPathWordFunc
}
func newApp(subRouter router.Party, container *hero.Container) *Application {
@@ -119,6 +122,11 @@ func (app *Application) SetName(appName string) *Application {
return app
}
func (app *Application) SetCustomPathWordFunc(wordFunc CustomPathWordFunc) *Application {
app.customPathWordFunc = wordFunc
return app
}
// SetControllersNoLog disables verbose logging for next registered controllers
// under this App and its children of `Application.Party` or `Application.Clone`.
//