New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bitbucket.org/astein58/sitemap

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitbucket.org/astein58/sitemap

  • v0.0.0-20150907163120-c899b951fa6a
  • Source
  • Go
  • Socket score

Version published
Created
Source

sitemap

Is a package that generate XML sitemap from the given page objects.

It implement the sitemap page and sitemap index.

Documentation can be found at: http://godoc.org/github.com/alexandreStein/sitemap

Example:

package main

import (
	"fmt"
	"time"

	"github.com/alexandreStein/sitemap"
)

func main() {
	// Set the last modification to now
	now := time.Now()

	// Initialize a standard sitemap
	sMap := sitemap.Page{
		Urlset: []*sitemap.Sitemap{
			&sitemap.Sitemap{
				Loc:        "https://www.test.com",
				LastMod:    &now,
				Changefreq: sitemap.Daily,
				Priority:   0.5,
			},
		},
	}
	// Build the XML output
	x, err := sMap.GetXML()
	fmt.Println(string(x), err)

	// Initialize an index sitemap
	sMapi := sitemap.IndexPage{
		Urlset: []*sitemap.Sitemap{
			&sitemap.Sitemap{
				Loc: "https://www.test.com/sitemap.xml",
			},
		},
	}
	// Same as sitemap page build the XML using GetXML
	x, err = sMapi.GetXML()
	fmt.Println(string(x), err)
}

FAQs

Package last updated on 07 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc