initial commit

This commit is contained in:
2025-02-22 23:00:56 +08:00
commit 61ffeeb3b8
20 changed files with 1676 additions and 0 deletions

15
magic/request.go Normal file
View File

@ -0,0 +1,15 @@
package magic
import (
"context"
"net/http"
)
func init() {
RegisterExtractorGeneric[*http.Request](func(r *http.Request) (any, error) {
return r, nil
})
RegisterExtractorGeneric[context.Context](func(r *http.Request) (any, error) {
return r.Context(), nil
})
}