mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 15:14:08 +00:00
zig-ception update
This commit is contained in:
parent
fe4e3f94a5
commit
bb587ac2a2
1 changed files with 5 additions and 0 deletions
|
@ -61,6 +61,11 @@ when the order of your chain of components isn't perfect yet. 😉
|
|||
Have a look at an excerpt of the example:
|
||||
|
||||
```zig
|
||||
// create a combined context struct
|
||||
const Context = zap.Middleware.MixContexts(.{
|
||||
.{ .name = "?user", .type = UserMiddleWare.User },
|
||||
.{ .name = "?session", .type = SessionMiddleWare.Session },
|
||||
});
|
||||
|
||||
// we create a Handler type based on our Context
|
||||
const Handler = zap.Middleware.Handler(Context);
|
||||
|
|
Loading…
Add table
Reference in a new issue