func requestJobs(r render.Render, req *http.Request) { if req.URL.Query().Get("json") != "" { r.JSON(200, jobrunner.StatusJson()) } else { r.HTML(200, "jobs/Status", jobrunner.StatusPage()) } }
func JobHtml(c *gin.Context) { Template := template.New("Status") s, err := Template.Parse(status) if err != nil { fmt.Println("err:", err) return } s.Execute(c.Writer, jobrunner.StatusPage()) }
func JobHtml(c *gin.Context) { // Returns the template data pre-parsed c.HTML(200, "", jobrunner.StatusPage()) }