Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur White committed Jun 20, 2017
1 parent 281f6ca commit 55ebbfe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -68,7 +68,7 @@ Package [router](https://godoc.org/github.com/gowww/router) provides a lightning

A named parameter begins with `:` and matches any value until the next `/` in path.

To retreive the value (stored in request's context), ask [Parameter](https://godoc.org/github.com/gowww/router#Parameter).
To retrieve the value (stored in request's context), ask [Parameter](https://godoc.org/github.com/gowww/router#Parameter).
It will return the value as a string (empty if the parameter doesn't exist).

Example, with a parameter `id`:
Expand Down Expand Up @@ -108,7 +108,7 @@ rt.Get(`/users/:id:^\d+$`, http.HandlerFunc(func(w http.ResponseWriter, r *http.
}))
```

If you don't need to retreive the parameter value but only use a regular expression, you can omit the parameter name:
If you don't need to retrieve the parameter value but only use a regular expression, you can omit the parameter name:

```Go
rt.Get(`/shows/::^prison-break-s06-.+`, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -191,7 +191,7 @@ In other words, `/files` and `/files/` are two different routes.

For serving static files, like for other routes, just bring your own handler.

Exemple, with the standard [net/http.FileServer](https://golang.org/pkg/net/http#FileServer):
Example, with the standard [net/http.FileServer](https://golang.org/pkg/net/http#FileServer):

```Go
rt.Get("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
Expand Down

0 comments on commit 55ebbfe

Please sign in to comment.