Skip to content

Commit

Permalink
docs(readme): correct a few mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
utilyre committed Nov 9, 2024
1 parent 687f98e commit 4414d71
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Package xmate provides missing convenient functionality for net/http.

## Usage

### Basic
### Handlers

In the simplest scenario, wrap the HTTP handlers and functional HTTP handlers
with `xmate.Handle` and `xmate.HandleFunc`, respectively.
In the simplest scenario, wrap HTTP handlers and functional HTTP handlers with
`xmate.Handle` and `xmate.HandleFunc`, respectively.

> [!NOTE]
> These top-level functions convert the given HTTP handler into the standard
Expand Down Expand Up @@ -49,9 +49,10 @@ func (sh statusHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) error
}
```

### In middleware
### Middlewares

Instead of wrapping the middleware itself, wrap the function returned from it.
Instead of wrapping the middleware itself, wrap the function returned from it
with `xmate.HandleFunc`.

```go
package main
Expand Down

0 comments on commit 4414d71

Please sign in to comment.