func Delete(rw http.ResponseWriter, req *http.Request, r render.Render, params martini.Params) { ctx := appengine.NewContext(req) t := testimonials.Testimonial{} intID, err := strconv.Atoi(params["id"]) if err == nil { t.ID = int64(intID) } if err := t.Delete(ctx); err != nil { http.Error(rw, "failed to delete testimonial", http.StatusInternalServerError) return } r.Status(200) return }