You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
354 B
17 lines
354 B
|
4 years ago
|
package handlecontroller
|
||
|
|
|
||
|
|
import (
|
||
|
|
"main_exam_server/controller"
|
||
|
|
"net/http"
|
||
|
|
|
||
|
|
"github.com/unrolled/render"
|
||
|
|
)
|
||
|
|
|
||
|
|
//首页数据处理
|
||
|
|
func GetIndexPage() http.HandlerFunc {
|
||
|
|
return func(rw http.ResponseWriter, rep *http.Request) {
|
||
|
|
formatter := render.New(render.Options{IndentJSON: true})
|
||
|
|
formatter.JSON(rw, http.StatusOK, controller.Index(rep))
|
||
|
|
}
|
||
|
|
}
|