Skip to content

Commit 26ea96f

Browse files
committed
Updated docs
1 parent f7f22ab commit 26ea96f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ Go Router
77

88
# Usage
99

10+
## Importing
11+
12+
import "github.com/c0rrzin/router"
13+
1014
## Defining routes
1115

12-
DefRoute("POST", "/", func(w http.ResponseWriter, r *http.Request) {
16+
router.DefRoute("POST", "/", func(w http.ResponseWriter, r *http.Request) {
1317
fmt.Fprintf(w, "Hello POST")
1418
})
15-
DefRoute("GET", "/", func(w http.ResponseWriter, r *http.Request) {
19+
router.DefRoute("GET", "/", func(w http.ResponseWriter, r *http.Request) {
1620
fmt.Fprintf(w, "Hello GET")
1721
})
1822

@@ -22,7 +26,7 @@ Before you instantiate the server:
2226
func main() {
2327
...
2428

25-
RouteAll()
29+
router.RouteAll()
2630

2731
...
2832
}

0 commit comments

Comments
 (0)