Skip to content

Instantly share code, notes, and snippets.

@arschles
Created July 23, 2015 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arschles/f67ca523e849f82ccd61 to your computer and use it in GitHub Desktop.
Save arschles/f67ca523e849f82ccd61 to your computer and use it in GitHub Desktop.
package main
import "github.com/gorilla/mux"
func main() {
r := mux.NewRouter()
r.HandleFunc("/reservations/{key}", func1).Methods("POST")
r.HandleFunc("/values/{key}/{lock_id}", func2).Queries("release", "").Methods("POST")
r.HandleFunc("/values/{key}", func3).Methods("PUT")
http.ListenAndServe(":8080", r)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment