1 2 3 4 5 6 7 8 9 10 11 12 13 14
package popular import ( "net/http" ) func Threads(w http.ResponseWriter, r *http.Request) { threads, err := GetPopularThreads(25, "2020-06-01") if err != nil { http.NotFound(w, r) return } renderPopularThreads(w, threads) }