support variables in modify request,response middlewares

This commit is contained in:
yusing
2024-12-03 10:20:18 +08:00
parent cd749ac6a4
commit ef1863f810
15 changed files with 291 additions and 114 deletions

View File

@@ -109,8 +109,7 @@ func ExpectType[T any](t *testing.T, got any) (_ T) {
t.Helper()
_, ok := got.(T)
if !ok {
t.Fatalf("expected type %s, got %s", reflect.TypeFor[T](), reflect.TypeOf(got).Elem())
return
t.Fatalf("expected type %s, got %T", reflect.TypeFor[T](), got)
}
return got.(T)
}