From 2e9d161f5cc43ce24e8f846b0ea1fd6d4a2d0901 Mon Sep 17 00:00:00 2001 From: Mat Kelly Date: Thu, 18 Apr 2024 14:37:43 -0400 Subject: [PATCH] Increment memento count as processing --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 3566ef7..b3090ce 100644 --- a/main.go +++ b/main.go @@ -355,7 +355,7 @@ func generateSummary(urir string, basetm *list.List, format string, dataCh chan Last Memento Count int } - + archives := make(map[string]Archive) for e := basetm.Front(); e != nil; e = e.Next() { lnk := e.Value.(Link) @@ -390,6 +390,8 @@ func generateSummary(urir string, basetm *list.List, format string, dataCh chan archive.First = memento archives[hostbuck[2]] = archive } + archive.Count += 1 + archives[hostbuck[2]] = archive } else { memento := Memento{lnk.Href, dt} newarchive := Archive{memento, memento, 1} @@ -706,8 +708,6 @@ func memgatorService(w http.ResponseWriter, r *http.Request, urir string, format http.Redirect(w, r, closest, http.StatusFound) return } - // Format is empty string here - fmt.Printf(format) if format == "timemapsummary" { go generateSummary(urir, basetm, format, dataCh, navonly, sess) mime, ok := mimeMap[strings.ToLower(format)]