Skip to content

Commit

Permalink
docusaurus-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed Jan 18, 2023
1 parent 0760292 commit 2cda409
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.{md,txt}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false
4 changes: 2 additions & 2 deletions docs/api/middleware/filesystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ title: FileSystem
sidebar_position: 11
---

Filesystem middleware for [Fiber](https://github.com/gofiber/fiber) that enables you to serve files from a directory.

:::caution
**`:params` & `:optionals?` within the prefix path are not supported!**
:::
:::caution
**To handle paths with spaces (or other url encoded values) make sure to set `fiber.Config{ UnescapePath: true}`**
:::

Expand Down
4 changes: 2 additions & 2 deletions docs/api/middleware/timeout.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Timeout
sidebar_position: 20
---

Timeout middleware for Fiber. As a `fiber.Handler` wrapper, it creates a context with `context.WithTimeout` and pass it in `UserContext`. If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized `ErrorHandler`.
Timeout middleware for [Fiber](https://github.com/gofiber/fiber). As a `fiber.Handler` wrapper, it creates a context with `context.WithTimeout` and pass it in `UserContext`. If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized `ErrorHandler`.

It does not cancel long running executions. Underlying executions must handle timeout by using `context.Context` parameter.

Expand Down Expand Up @@ -126,4 +126,4 @@ func main() {
app.Get("/foo", timeout.New(handler, 10*time.Second))
app.Listen(":3000")
}
```
```

0 comments on commit 2cda409

Please sign in to comment.