Categorygithub.com/yterajima/go-sitemap
modulepackage
0.4.0
Repository: https://github.com/yterajima/go-sitemap.git
Documentation: pkg.go.dev

# README

go-sitemap

Github Actions CI GoDoc

go-sitemap get sitemap.xml (or sitemapindex.xml) and generate Sitemap object.

Installation

go install github.com/yterajima/go-sitemap

# Functions

ForceGet is fetch and parse sitemap.xml/sitemapindex.xml.
Get is fetch and parse sitemap.xml/sitemapindex.xml If sitemap.xml or sitemapindex.xml has some problems, This function return error.
Parse create Sitemap data from text.
ParseIndex create Index data from text.
ReadSitemap is a function that reads a file and returns a Sitemap structure.
ReadSitemapIndex is a function that reads a file and returns a Index structure.
SetFetch change fetch closure.
SetInterval change Time interval to be used in Index.get.

# Structs

Index is a structure of <sitemapindex>.
Sitemap is a structure of <sitemap>.
URL is a structure of <url> in <sitemap>.