package main import ( "net/http" "github.com/gorilla/mux" ) func IndexHandler(w http.ResponseWriter, r *http.Request) { w.Write([]byte("hello world!")) } func main() { r := mux.NewRouter() r.HandleFunc("/", IndexHandler) http.ListenAndServe(":8000", r) }