From 50ffad2e4698514a3b48d67d3cc0cdbef0e12f22 Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 1 Dec 2018 00:10:59 +0100 Subject: [PATCH] Added explanation about the binder --- Readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Readme.md b/Readme.md index 316dce0..51d14cb 100644 --- a/Readme.md +++ b/Readme.md @@ -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.