From 138d431695c22927f1b5ab76486390960f5cbb3c Mon Sep 17 00:00:00 2001 From: demo Date: Thu, 28 May 2026 13:31:49 -0400 Subject: feat: add "total entries" as part of XML comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is useful mostly in the context of maxURLs=∞, but perhaps it could also help catch some error cases. --- xml.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xml.go') diff --git a/xml.go b/xml.go index 74ecc0d..e4ad0e8 100644 --- a/xml.go +++ b/xml.go @@ -37,7 +37,7 @@ func toSitemap(seen map[url.URL]int, maxDepth, maxURLs int) (string, error) { set := XMLURLset{ Xmlns: "http://www.sitemaps.org/schemas/sitemap/0.9", URLs: xmlURLs, - Comment: fmt.Sprintf("max depth: %s, max urls: %s", toSymbol(maxDepth), toSymbol(maxURLs)), + Comment: fmt.Sprintf("max depth: %s, max urls: %s, total entries: %d", toSymbol(maxDepth), toSymbol(maxURLs), len(seen)), } output, err := xml.MarshalIndent(&set, "", "\t") -- cgit v1.2.3