diff options
| author | demo <demo@antix1> | 2026-05-28 13:31:49 -0400 |
|---|---|---|
| committer | demo <demo@antix1> | 2026-05-28 13:32:59 -0400 |
| commit | 138d431695c22927f1b5ab76486390960f5cbb3c (patch) | |
| tree | 9ebcfd7a1914f00e8c895d2500e9db250a3f627b | |
| parent | eae74f26ada313c15057013a1df6b81b50d94a90 (diff) | |
feat: add "total entries" as part of XML comment
This is useful mostly in the context of maxURLs=∞, but perhaps it
could also help catch some error cases.
| -rw-r--r-- | xml.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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") |
