16 lines
274 B
Go
16 lines
274 B
Go
|
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
|
||
|
})
|
||
|
}
|