package
module
Version:
v0.2.2
Opens a new window with list of versions in this module.
Published: Sep 26, 2018
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
go-sitemap
go-sitemap get sitemap.xml (or sitemapindex.xml) and generate Sitemap object.
Installation
go get github.com/yterajima/go-sitemap
Usage
See example.
Documentation
¶
SetFetch change fetch closure
SetInterval change Time interval to be used in Index.get
type Index struct {
XMLName xml.Name `xml:"sitemapindex"`
Sitemap []parts `xml:"sitemap"`
}
Index is a structure of <sitemapindex>
ParseIndex create Index data from text
type Sitemap struct {
XMLName xml.Name `xml:"urlset"`
URL []URL `xml:"url"`
}
Sitemap is a structure of <sitemap>
Get sitemap data from URL
Parse create Sitemap data from text
type URL struct {
Loc string `xml:"loc"`
LastMod string `xml:"lastmod"`
ChangeFreq string `xml:"changefreq"`
Priority float32 `xml:"priority"`
}
URL is a structure of <url> in <sitemap>
Source Files
¶
Directories
¶
_example
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.