func OptPath(path string) Option {
	return func(r *Request) error {
		if r.Request == nil {
			return ex.New(ErrRequestUnset)
		}
		if r.Request.URL == nil {
			r.Request.URL = &url.URL{}
		}
		if !strings.HasPrefix(path, "/") {
			path = "/" + path
		}
		r.Request.URL.Path = path
		return nil
	}
}
// OptPath sets the url path.
OptPath sets the url path.
// OptPath sets the url path .
func OptPath(path string) Option {
	return func(r *Request) error {
		if r.Request == nil {
			return ex.New(ErrRequestUnset)
		}
		if r.Request.URL == nil {
			r.Request.URL = &url.URL{}
		}
		if !strings.HasPrefix(path, "/") {
			path = "/" + path
		}
		r.Request.URL.Path = path
		return nil
	}
}
func OptPath ( path string ) Option { return func ( r * Request ) error { if r . Request == nil { return ex . New ( ErrRequestUnset ) } if r . Request . URL == nil { r . Request . URL = & url . URL { } } if ! strings . HasPrefix ( path , " " ) { path = " " + path } r . Request . URL . Path = path return nil } }
OptPath sets the url path.
OptPath sets the url path .