func (r *Router) Navigate(path string, query url.Values, opts ...NavigatorOpt) error {
	r.process(path, query)
	pq := r.pathPrefix + path
	q := query.Encode()
	if len(q) > 0 {
		pq = pq + "?" + q
	}
	if navOpts(opts).has(NavReplace) {
		r.replacePathAndQuery(pq)
	} else {
		r.pushPathAndQuery(pq)
	}
	return nil
}
Navigate will go the specified path and query.
package vgrouter
import (
	"fmt"
	"log"
	"net/http"
	"net/url"
	"strings"
	"github.com/vugu/vugu/js"
)
type EventEnv interface {
	Lock()          
	UnlockOnly()    
	UnlockRender()  
}
func New(eventEnv EventEnv) *Router {
	return &Router{
		eventEnv:     eventEnv,
		bindParamMap: make(map[string]BindParam),
	}
}
type Router struct {
	useFragment bool
	pathPrefix  string
	popStateFunc js.Func
	eventEnv EventEnv
	rlist           []routeEntry
	notFoundHandler RouteHandler
	bindRouteMPath mpath
	bindParamMap   map[string]BindParam
}
type routeEntry struct {
	mpath mpath
	rh    RouteHandler
}
func (r *Router) SetUseFragment(v bool) {
	r.useFragment = v
}
func (r *Router) SetPathPrefix(pfx string) {
	r.pathPrefix = pfx
}
func (r *Router) ListenForPopState() error {
	return r.addPopStateListener(func(this js.Value, args []js.Value) interface{} {
		u, err := r.readBrowserURL()
		if err != nil {
			log.Printf("ListenForPopState: error from readBrowserURL: %v", err)
			return nil
		}
		p := u.Path
		if !strings.HasPrefix(p, r.pathPrefix) {
			log.Printf("ListenForPopState: prefix error: %v",
				ErrMissingPrefix{Path: p, Message: fmt.Sprintf("path %q does not begin with prefix %q", p, r.pathPrefix)})
			return nil
		}
		tp := strings.TrimPrefix(p, r.pathPrefix)
		q := u.Query()
		r.eventEnv.Lock()
		defer r.eventEnv.UnlockRender()
		r.process(tp, q)
		return nil
	})
}
func (r *Router) UnlistenForPopState() error {
	return r.removePopStateListener()
}
func (r *Router) MustNavigate(path string, query url.Values, opts ...NavigatorOpt) {
	err := r.Navigate(path, query, opts...)
	if err != nil {
		panic(err)
	}
}