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)
|
* [Search](#search)
|
||||||
* [Standard web handler](#standard-web-handler)
|
* [Standard web handler](#standard-web-handler)
|
||||||
* [Errors](#errors)
|
* [Errors](#errors)
|
||||||
|
* [URL param binder](#how-the-url-param-binder-works)
|
||||||
|
|
||||||
## Installation
|
## 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
Block a user