Skip to content

Instantly share code, notes, and snippets.

@taion809
Created April 13, 2014 19:39
Show Gist options
  • Save taion809/10599109 to your computer and use it in GitHub Desktop.
Save taion809/10599109 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"github.com/gorilla/mux"
"net/http"
)
func HomeHandler(w http.ResponseWriter, r *http.Request) {
fmt.Println("Home handler called.. wooo")
}
func main() {
router := mux.NewRouter()
router.HandleFunc("/", HomeHandler)
http.Handle("/", router)
http.ListenAndServe(":8080", nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment