func (d *DataController) All(w rest.ResponseWriter, req *rest.Request) { s := req.PathParam("s") c := req.PathParam("c") startId, _ := strconv.Atoi(s) count, _ := strconv.Atoi(c) data := new(model.Data) datas, err := data.All(startId, count) if err != nil { w.WriteJson(err) return } w.WriteJson(datas) }