3 ms·
Any suggestions for how to store request scoped data without context? Specifically when using middlewares, like in the example of an auth middleware, needs stor
by user9999999999 2y ago
Any suggestions for how to store request scoped data without context? Specifically when using middlewares, like in the example of an auth middleware, needs store isAdmin or isLoggedIn or UserId
- alpb 2y agoPresumably you control the entire handler stack in Go. So you can extend the HandlerFunc signature with parameters customizations to carry explicit structs, or return “error”, for example.