code: func (h ddlHistoryJobHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
  	if limitID := req.FormValue(qLimit); len(limitID) > 0 {
  		lid, err := strconv.Atoi(limitID)
  
  		if err != nil {
  			writeError(w, err)
  			return
  		}
  
  		if lid < 1 {
  			writeError(w, errors.New("ddl history limit must be greater than 1"))
  			return
  		}
  
  		jobs, err := h.getAllHistoryDDL()
  		if err != nil {
  			writeError(w, errors.New("ddl history not found"))
  			return
  		}
  
  		jobsLen := len(jobs)
  		if jobsLen > lid {
  			start := jobsLen - lid
  			jobs = jobs[start:]
  		}
  
  		writeData(w, jobs)
  		return
  	}
  	jobs, err := h.getAllHistoryDDL()
  	if err != nil {
  		writeError(w, errors.New("ddl history not found"))
  		return
  	}
  	writeData(w, jobs)
  }
docs: // ServeHTTP handles request of ddl jobs history.