sitemap

package
v0.0.0-...-b1b3a06 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sitemap

type Sitemap struct {
	XMLName xml.Name `xml:"urlset"`
	Xmlns   string   `xml:"xmlns,attr"`
	URLs    []URL    `xml:"url"`
	// contains filtered or unexported fields
}

Sitemap is awesome

func New

func New() *Sitemap

New - creates new sitemap

func (*Sitemap) AddLocation

func (s *Sitemap) AddLocation(location string)

AddLocation - adds new location to sitemap

func (*Sitemap) SaveToFile

func (s *Sitemap) SaveToFile(path string) error

SaveToFile - save sitemap to path

type URL

type URL struct {
	XMLName  xml.Name `xml:"url"`
	Location string   `xml:"loc"`
	LastMod  string   `xml:"lastmod"`
}

URL is awesome

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL