sitemap-format
A simple sitemap generator, with a little syntactic sugar
About sitemap-format
Sitemap Format
Simple sitemap formatting, with a little syntactic sugar.
Installation
go get github.com/mingard/sitemap-format
Usage
Creating a basic Sitemap
package main
import sitemap "github.com/mingard/sitemap-format"
func main() {
xml := sitemap.New()
loc := sitemap.NewLoc()
loc.SetLocation("https://domain.com")
xml.Add(loc)
out, _ := xml.OutputString()
fmt.Println(out)
}
// Output: <?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://domain.com</loc><lastmod>2022-11-03T11:56:00.26065Z</lastmod></url></urlset>
Frequently Asked Questions
What is sitemap-format?
sitemap-format is a Miscellaneous library for the Go programming language. A simple sitemap generator, with a little syntactic sugar
How do I install sitemap-format?
Install sitemap-format with the Go module system using `go get mingard/sitemap-format`. Check the repository for the current installation instructions.
What category does sitemap-format belong to?
sitemap-format is listed under Miscellaneous, specifically Uncategorized.