func GetTechSupport(rw http.ResponseWriter, req *http.Request, enc encoding.Encoder, params martini.Params) string { var err error var t techSupport.TechSupport id := params["id"] t.ID, err = strconv.Atoi(id) if err != nil { apierror.GenerateError("Error parsing Id.", err, rw, req) } err = t.Get() if err != nil { apierror.GenerateError("Error getting Tech Support.", err, rw, req) } return encoding.Must(enc.Encode(t)) }