URL path using Gorilla Mux or Httprouter?

The context I am looking for is this:

func main() {
	r := mux.NewRouter()
    path := mux.Vars(r)
    val := vars["id"]

	r.HandleFunc("/{path}/{val}",{path}).Methods(http.MethodPost)
	r.HandleFunc("/{path}/{val}",{path}).Methods(http.MethodGet)
	r.HandleFunc("/{path}/{val}",{path}).Methods(http.MethodPut)
	r.HandleFunc("/{path}/{val}",{path}).Methods(http.MethodDelete)
	r.HandleFunc("/", notFound)
	log.Fatal(http.ListenAndServe(":9999", nil))
}

I want the path to be more dynamic. I use this on my test site using net/http The Web Server and it works perfect.

My goal is to replace net/http with Gorilla Mux OR httprouter instead. Is this possible?