Skip to content

Instantly share code, notes, and snippets.

@kaneshin
Last active October 18, 2016 10:51
Show Gist options
  • Save kaneshin/a6261f7d32e55dc089eda32822c4bd0e to your computer and use it in GitHub Desktop.
Save kaneshin/a6261f7d32e55dc089eda32822c4bd0e to your computer and use it in GitHub Desktop.
package app
import (
"net/http"
"github.com/gorilla/mux"
)
func init() {
r := mux.NewRouter()
r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("It works!"))
})
http.Handle("/", r)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment