1
0
Fork 0
forked from forgejo/forgejo

[TESTS] testMiddlewareHook, dependency injection in integration tests

(cherry picked from commit 6623630d10)
(cherry picked from commit 5e30a4f950)
(cherry picked from commit 355a117e74)
(cherry picked from commit 2e98ceccbc)
This commit is contained in:
Earl Warren 2023-06-05 11:04:47 +02:00
parent 260d938e92
commit e1687f1e20
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
6 changed files with 32 additions and 18 deletions

View file

@ -14,6 +14,10 @@ import (
chi "github.com/go-chi/chi/v5"
)
type KeyTestMiddlewareHookType string
var KeyTestMiddlewareHook = KeyTestMiddlewareHookType("testMiddlewareHook")
// Bind binding an obj to a handler
func Bind[T any](_ T) any {
return func(ctx *context.Context) {