forked from forgejo/forgejo
[TESTS] testMiddlewareHook, dependency injection in integration tests
(cherry picked from commit 6623630d10
)
This commit is contained in:
parent
03936c6492
commit
5e30a4f950
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