diff --git a/README.md b/README.md index f9e59c5..daa23c3 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Golax is the official go implementation for the _Lax_ framework. - [About Lax](#about-lax) - [Getting started](#getting-started) +- [Routing example](#routing-example) - [Performance](#performance) - [How interceptor works](#how-interceptor-works) - [Handling parameters](#handling-parameters) @@ -53,6 +54,20 @@ my_api.Root.Node("hello"). my_api.Serve() ``` +## Routing example + +Routing is based on nodes. + +
+ +
+ +There are three types: `static`, `regex` and `parameter`. + +* static: Only matches with the url part if it is exactly the same. +* regex: Surrounded by `(` and `)`, if the regex match. +* parameter: Surrounded by `{` and `}`, always matches. + ## Performance The performance compared with the [most popular alternative](http://www.gorillatoolkit.org/) is very similar (actually _golax_ performs slightly better) however code readability and maintainability is far better with _golax_ implementation. diff --git a/doc/figure_4_routing_example.png b/doc/figure_4_routing_example.png new file mode 100644 index 0000000..b53adb1 Binary files /dev/null and b/doc/figure_4_routing_example.png differ