I'm playing around with the gorilla.mux
library for Go. I have the following configuration, but I cant figure out the URL to reach the HelloWorldXml
method.
func main() {
router := mux.NewRouter()
router.HandleFunc("/{name}.xml", HelloWorldXml).
PathPrefix("/products/")
router.HandleFunc("/hello/{name}", HelloWorld)
http.Handle("/", router)
http.ListenAndServe(":8787",nil)
}
What would be the proper URL to use? http://localhost:8787/products/MyName.xml
returns a 404.