aboutsummaryrefslogtreecommitdiff
path: root/web/sitemaps/index.go
blob: b553bc0c26f304161ec9a7c85ed8b4028b01e19f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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},
	}
}