) ! // GET༻ͷHandler func getuser(w http.ResponseWriter, r *http.Request) { params := r.URL.Query() id := params.Get(":id") fmt.Fprintf(w, "you are get user %s", id) } // PUT, DELETE, POST༻ͷ… ! func main() { mux := routes.New() // GET, PUT, DELETE, POST ༻ͷϋϯυϥʔؔΛrouting͢Δ mux.Get("/users/:id", getuser) mux.Put("/users/:id", modifyuser) mux.Del("/users/:id", deleteuser) mux.Post("/users/", adduser) http.Handle("/", mux) http.ListenAndServe(":9090", nil) } ESPOFSPVUFTͱ͔HPXFCͱ͔ͷ ϧʔςΟϯά༻ͷ SENPEVMFTΛ͏ େͨ͜͠ͱͬͯͳ͍ͷͰɺ OFUIUUQ͚ͩͰؤுΔࣄՄೳ͕ͩɺ JE͔Β࢝·Δจࣈͷύʔεͱ NFUIPEʹΑΔSPVUJOHॲཧ͕໘ͳΒ ͜͏͍͏Ϟδϡʔϧ͏ͷ͋Γɻ