func WithRedirectBehavior(value RedirectBehavior) Option {
	return option(func(c *config) {
		c.redirectBehavior = value
	})
}
WithRedirectBehavior sets the default redirect behavior when RedirectTrailingSlash or
RedirectCleanPath are true. The default value is Redirect301.
package treemux
type config struct {
	notFoundHandler         HandlerFunc
	methodNotAllowedHandler HandlerFunc
	headCanUseGet               bool
	redirectCleanPath           bool
	redirectTrailingSlash       bool
	removeCatchAllTrailingSlash bool
	redirectBehavior       RedirectBehavior
	redirectMethodBehavior map[string]RedirectBehavior
	useURLPath bool
	group *Group
}
func (c *config) wrapHandler(handler HandlerFunc) HandlerFunc {
	return c.group.handlerWithMiddlewares(handler)
}
type Option interface {
	apply(cfg *config)
}
type option func(cfg *config)
func (fn option) apply(cfg *config) {
	fn(cfg)
}
func WithNotFoundHandler(handler HandlerFunc) Option {
	return option(func(c *config) {
		c.notFoundHandler = c.wrapHandler(handler)
	})
}
func WithMethodNotAllowedHandler(handler HandlerFunc) Option {
	return option(func(c *config) {
		c.methodNotAllowedHandler = c.wrapHandler(handler)
	})
}
func WithHeadCanUseGet(on bool) Option {
	return option(func(c *config) {
		c.headCanUseGet = on
	})
}
func WithRedirectCleanPath(on bool) Option {
	return option(func(c *config) {
		c.redirectCleanPath = on
	})
}
func WithRedirectTrailingSlash(on bool) Option {
	return option(func(c *config) {
		c.redirectTrailingSlash = on
	})
}
func WithRemoveCatchAllTrailingSlash(on bool) Option {
	return option(func(c *config) {
		c.removeCatchAllTrailingSlash = on
	})
}