Exemplo n.º 1
0
func ServicesHandler(router *pat.Router, w http.ResponseWriter, req *http.Request) {
	url, _ := router.GetRoute("services").URL()
	fmt.Fprintf(w, "Services List Page! Go -> %s", url)
}
Exemplo n.º 2
0
func HomeHandler(router *pat.Router, w http.ResponseWriter, req *http.Request) {
	url, _ := router.GetRoute("service").URL("service_name", "trolling-and-molling")
	fmt.Fprintf(w, "Home handler! %s", url)
}