func (d *ExtendController) 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.Extend) datas, err := data.All(startId, count) if err != nil { fmt.Println(err) w.WriteJson(err) return } w.WriteJson(datas) }