forked from forgejo/forgejo
[TESTS] testMiddlewareHook, dependency injection in integration tests
(cherry picked from commit6623630d10
) (cherry picked from commit5e30a4f950
) (cherry picked from commit355a117e74
) (cherry picked from commit2e98ceccbc
)
This commit is contained in:
parent
260d938e92
commit
e1687f1e20
6 changed files with 32 additions and 18 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue