Skip to content

Commit

Permalink
docs(readme): document hostname routing support
Browse files Browse the repository at this point in the history
  • Loading branch information
tigerwill90 committed Nov 15, 2024
1 parent c1b60fd commit 7f2b37d
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,6 @@ func main() {
}
}
````
#### Error handling
Since new route may be added at any given time, Fox, unlike other router, does not panic when a route is malformed or conflicts with another.
Instead, it returns the following error values:
```go
ErrRouteExist = errors.New("route already registered")
ErrRouteConflict = errors.New("route conflict")
ErrInvalidRoute = errors.New("invalid route")
```

Conflict error may be unwrapped to retrieve conflicting route.
```go
if errors.Is(err, fox.ErrRouteConflict) {
matched := err.(*fox.RouteConflictError).Matched
for _, route := range matched {
fmt.Println(route)
}
}
```

#### Named parameters
Routes can include named parameters using curly braces `{}` to match exactly one non-empty route segment. The matching
Expand Down

0 comments on commit 7f2b37d

Please sign in to comment.