func (p *Mux) RegisterAutomaticOPTIONS(middleware ...Middleware) {
	p.automaticallyHandleOPTIONS = true
	h := automaticOPTIONSHandler
	for i := len(middleware) - 1; i >= 0; i-- {
		h = middleware[i](h)
	}
	p.httpOPTIONS = h
}
RegisterAutomaticOPTIONS tells pure whether to
automatically handle OPTION requests; manually configured
OPTION handlers take precedence. default true
package pure
import (
	"context"
	"net/http"
	"strings"
	"sync"
	httpext "github.com/go-playground/pkg/v5/net/http"
)
var (
	defaultContextIdentifier = &struct {
		name string
	}{
		name: "pure",
	}
)
type Mux struct {
	routeGroup
	trees map[string]*node
	pool sync.Pool
	http404     http.HandlerFunc  
	http405     http.HandlerFunc  
	httpOPTIONS http.HandlerFunc
	mostParams uint8
	redirectTrailingSlash bool
	handleMethodNotAllowed bool
	automaticallyHandleOPTIONS bool
}
type urlParam struct {
	key   string
	value string
}
type urlParams []urlParam
func (p urlParams) Get(key string) (param string) {
	for i := 0; i < len(p); i++ {
		if p[i].key == key {
			param = p[i].value
			return
		}
	}
	return
}
type Middleware func(h http.HandlerFunc) http.HandlerFunc
var (
	default404Handler = func(w http.ResponseWriter, r *http.Request) {
		http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
	}
	methodNotAllowedHandler = func(w http.ResponseWriter, r *http.Request) {
		w.WriteHeader(http.StatusMethodNotAllowed)
	}
	automaticOPTIONSHandler = func(w http.ResponseWriter, r *http.Request) {
		w.WriteHeader(http.StatusOK)
	}
)
func New() *Mux {
	p := &Mux{
		routeGroup: routeGroup{
			middleware: make([]Middleware, 0),
		},
		trees:                      make(map[string]*node),
		mostParams:                 0,
		http404:                    default404Handler,
		http405:                    methodNotAllowedHandler,
		httpOPTIONS:                automaticOPTIONSHandler,
		redirectTrailingSlash:      true,
		handleMethodNotAllowed:     false,
		automaticallyHandleOPTIONS: false,
	}
	p.routeGroup.pure = p
	p.pool.New = func() interface{} {
		rv := &requestVars{
			params: make(urlParams, p.mostParams),
		}
		rv.ctx = context.WithValue(context.Background(), defaultContextIdentifier, rv)
		return rv
	}
	return p
}
func (p *Mux) Register404(notFound http.HandlerFunc, middleware ...Middleware) {
	h := notFound
	for i := len(middleware) - 1; i >= 0; i-- {
		h = middleware[i](h)
	}
	p.http404 = h
}