Added explanation about the binder
This commit is contained in:
parent
ec954ac350
commit
50ffad2e46
|
@ -32,6 +32,7 @@ implementations thus leading to much flexibility.
|
|||
* [Search](#search)
|
||||
* [Standard web handler](#standard-web-handler)
|
||||
* [Errors](#errors)
|
||||
* [URL param binder](#how-the-url-param-binder-works)
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -189,3 +190,10 @@ type HTTPError struct {
|
|||
}
|
||||
```
|
||||
|
||||
## How the url param binder works
|
||||
|
||||
The binder binds all values inside the url to their respective fields in a struct. Those fields need to have a tag
|
||||
"param" with the name of the url placeholder which must be the same as in routes.
|
||||
|
||||
Whenever one of the standard CRUD methods is invoked, this binder is called, which enables one handler method
|
||||
to handle all kinds of different urls with different parameters.
|
||||
|
|
Loading…
Reference in New Issue