←back to thread

257 points pmig | 2 comments | | HN request time: 0.433s | source
1. user9999999999 ◴[] No.43099117[source]
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
replies(1): >>43099200 #
2. alpb ◴[] No.43099200[source]
Presumably 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.