Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
github.com/sittipongwork/GoSitemapxml
Use Golang CLI
go get github.com/sittipongwork/GoSitemapxml
or
Github Repository
https://github.com/sittipongwork/GoSitemapxml.git
example : Import to go
import "github.com/sittipongwork/GoSitemapxml"
example
//Create Sitemap Container for keep data xml
sitemap := gositemap.CreateSitemapContainer("https://www.sitemaps.org/schemas/sitemap/0.9")
//Add Site you want to show in sitemap.xml
sitemap.AddSite("https://website.com/", "2016-11-23")
//You can add more one site : Example
sitemap.AddSite("https://website.com/blog/1", "2016-11-23")
sitemap.AddSite("https://website.com/blog/2", "2016-11-23")
sitemap.AddSite("https://website.com/blog/3", "2016-11-23")
sitemap.AddSite("https://website.com/contact", "2016-11-23")
//Mashal XML Data
output, _ := xml.MarshalIndent(sitemap, " ", " ")
//Print Output
os.Stdout.Write(output)
//NOTE : in iris framework
//you can run command , Dont MashalIndent
//iris.XML(iris.StatusOK, sitemap)
output
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://website.com/</loc>
<lastmod>2016-11-23</lastmod>
</url>
<url>
<loc>https://website.com/blog/1</loc>
<lastmod>2016-11-23</lastmod>
</url>
<url>
<loc>https://website.com/blog/2</loc>
<lastmod>2016-11-23</lastmod>
</url>
<url>
<loc>https://website.com/blog/3</loc>
<lastmod>2016-11-23</lastmod>
</url>
<url>
<loc>https://website.com/contact</loc>
<lastmod>2016-11-23</lastmod>
</url>
</urlset>
FAQs
Unknown package
Did you know?
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.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.