fix: error handling, defer cleanup, graceful shutdown, golangci-lint setup

This commit is contained in:
2026-04-18 17:32:34 +03:00
parent 44cb3c6576
commit ebb8cded41
16 changed files with 174 additions and 47 deletions

View File

@@ -60,7 +60,7 @@ func newTestServer(svc services.OrderServicer) *handler.Server {
func withClaims(r *http.Request, id uuid.UUID, role string) *http.Request {
claims := &handler.Claims{ID: id, Role: role}
ctx := context.WithValue(r.Context(), "user", claims)
ctx := context.WithValue(r.Context(), handler.UserKey, claims)
return r.WithContext(ctx)
}