initial commit
This commit is contained in:
15
magic/request.go
Normal file
15
magic/request.go
Normal 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
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user