diff options
Diffstat (limited to 'xml.go')
| -rw-r--r-- | xml.go | 10 |
1 files changed, 9 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: %d, max urls: %d", maxDepth, maxURLs), + Comment: fmt.Sprintf("max depth: %s, max urls: %s", toSymbol(maxDepth), toSymbol(maxURLs)), } output, err := xml.MarshalIndent(&set, "", "\t") @@ -48,3 +48,11 @@ func toSitemap(seen map[url.URL]int, maxDepth, maxURLs int) (string, error) { withHeader := fmt.Sprintf("%s\n%s", xml.Header, output) return withHeader, nil } + +func toSymbol(figure int) string { + if figure == 0 { + return "∞" + } + + return fmt.Sprintf("%d", figure) +} |
