You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-guide.md
+17-18Lines changed: 17 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,15 @@
1
1
# Matcha User Guide
2
2
3
-
-[Matcha User Guide](#matcha-user-guide)
4
-
- [Basics](#basics)
5
-
- [Hello World](#hello-world)
6
-
- [Echo Server with Route Parameters](#echo-server-with-route-parameters)
7
-
- [File Server with Partial Routes](#file-server-with-partial-routes)
8
-
- [Advanced Usage](#advanced-usage)
9
-
- [Mounting Subrouters](#mounting-subrouters)
10
-
- [Middleware](#middleware)
11
-
- [Requirements](#requirements)
12
-
- [FAQ](#faq)
13
-
- [Why are some of my routes not matched when they should be?](#why-are-some-of-my-routes-not-matched-when-they-should-be)
3
+
-[Basics](#basics)
4
+
- [Hello World](#hello-world)
5
+
- [Echo Server with Route Parameters](#echo-server-with-route-parameters)
6
+
- [File Server with Partial Routes](#file-server-with-partial-routes)
7
+
-[Advanced Usage](#advanced-usage)
8
+
- [Mounting Subrouters](#mounting-subrouters)
9
+
- [Middleware](#middleware)
10
+
- [Requirements](#requirements)
11
+
-[FAQ](#faq)
12
+
- [Why are some of my routes not matched when they should be?](#why-are-some-of-my-routes-not-matched-when-they-should-be)
14
13
15
14
Hello! This is a step-by-step guide to using Matcha for HTTP handling in Go.
16
15
@@ -20,7 +19,9 @@ There are a few examples in the `examples` directory to show basic usage.
20
19
21
20
### Hello World
22
21
23
-
You can use `matcha.Router` to create a new Router and `router.HandleFunc` to handle a request path.
22
+
You can use `matcha.Router` to create a new Router and `router.HandleFunc` to
23
+
handle a request path. Routers are type `*router.Router` if you need to store
24
+
it.
24
25
25
26
```go
26
27
package main
@@ -190,14 +191,12 @@ $
190
191
Requirements are defined in `require` as a `func(*http.Request) bool`. If you need more tools to check routes, you can `Require` a requirement with any Route. If this function returns false for any request, the route is not matched, but it can still match any routes after.
0 commit comments