package sitemaps import ( "encoding/xml" "time" ) type SitemapIndex struct { XMLName xml.Name Sitemaps []*SitemapRef `xml:"sitemap"` } type SitemapRef struct { Url string `xml:"loc"` LastModified *time.Time `xml:"lastmod,omitempty"` } func NewSitemapIndex() *SitemapIndex { return &SitemapIndex{ XMLName: xml.Name{Local: "sitemapindex", Space: xmlns}, } }