aah init.go file
Introduced in v0.10.0. aah brought
init.go file to evolve towards the next step.
Best Practice: Define extensions and custom implementations in an appropriate package and register it in
init.go. It brings a more flexible, organized and maintainable aah application. It is located at
- Server Extensions Points
- Application Events
- Subscribe to HTTP Events
- Subscribe to WebSocket Events
- Application Error Handler
- Custom Template Functions
- Custom Session Store
- Custom Value Parser - Auto bind request values
- Custom Validation Functions
Create an application and have a look at the file
<app-base-dir>/app/init.go to view a sample.