prow/tide/history/history.go
func (h *History) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	b, err := json.Marshal(h.AllRecords())
	if err != nil {
		logrus.WithError(err).Error("Encoding JSON history.")
		b = []byte("{}")
	}
	if _, err = w.Write(b); err != nil {
		logrus.WithError(err).Error("Writing JSON history response.")
	}
}
func (h *History) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	b, err := json.Marshal(h.AllRecords())
	if err != nil {
		logrus.WithError(err).Error("Encoding JSON history.")
		b = []byte("{}")
	}
	if _, err = w.Write(b); err != nil {
		logrus.WithError(err).Error("Writing JSON history response.")
	}
}
func ( h * History ) ServeHTTP ( w http . ResponseWriter , r * http . Request ) { b , err := json . Marshal ( h . AllRecords ( ) ) if err != nil { logrus . WithError ( err ) . Error ( " " ) b = [ ] byte ( " " ) } if _ , err = w . Write ( b ) ; err != nil { logrus . WithError ( err ) . Error ( " " ) } }
// ServeHTTP serves a JSON mapping from pool key -> sorted records for the pool.
ServeHTTP serves a JSON mapping from pool key - > sorted records for the pool .