mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-27 20:41:01 +00:00
[TESTS] testMiddlewareHook, dependency injection in integration tests
(cherry picked from commit6623630d10) (cherry picked from commit5e30a4f950) (cherry picked from commit355a117e74)
This commit is contained in:
parent
2c55a40c79
commit
2e98ceccbc
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