You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vox's `Context` object is a wrapper around the standard `context.Context` from the Go standard library. It provides a way to pass data between middlewares and to control the execution of the middleware chain.
9
+
10
+
## App
11
+
12
+
The `App` field is a pointer to the `vox.Application` instance. This can be used to access the application's configuration or other properties.
13
+
14
+
## Next
15
+
16
+
The `Next` function is used to call the next middleware in the chain. It's the middleware's responsibility to call the `Next` function. If a middleware does not call `Next`, the execution of the middleware chain will be terminated.
17
+
18
+
Here is an example of a simple logging middleware that uses the `Context` object to pass data to the next middleware:
19
+
20
+
```go
21
+
funcLogger(ctx *vox.Context, req *vox.Request, res *vox.Response) {
0 commit comments