Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mingard/sitemap-format
Simple sitemap formatting, with a little syntactic sugar
https://github.com/mingard/sitemap-format
Last synced: about 2 months ago
JSON representation
Simple sitemap formatting, with a little syntactic sugar
- Host: GitHub
- URL: https://github.com/mingard/sitemap-format
- Owner: mingard
- License: gpl-3.0
- Created: 2022-09-06T14:14:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-16T11:36:27.000Z (about 2 years ago)
- Last Synced: 2024-07-31T20:52:32.692Z (4 months ago)
- Language: Go
- Size: 76.2 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - sitemap-format - A simple sitemap generator, with a little syntactic sugar. (Miscellaneous / Uncategorized)
- zero-alloc-awesome-go - sitemap-format - A simple sitemap generator, with a little syntactic sugar. (Miscellaneous / Uncategorized)
README
# Sitemap Format
![Coverage](https://img.shields.io/badge/Coverage-100.0%25-brightgreen)
[![godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/mingard/sitemap-format)
[![Go Report Card](https://goreportcard.com/badge/mingard/sitemap-format)](https://goreportcard.com/report/mingard/sitemap-format)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e0330046dd004b99a155ad56031acd9f)](https://www.codacy.com/gh/mingard/sitemap-format/dashboard?utm_source=github.com&utm_medium=referral&utm_content=mingard/sitemap-format&utm_campaign=Badge_Grade)Simple sitemap formatting, with a little syntactic sugar.
## Installation
```sh
go get github.com/mingard/sitemap-format
```## Usage
### Creating a basic Sitemap
```go
package mainimport sitemap "github.com/mingard/sitemap-format"
func main() {
xml := sitemap.New()loc := sitemap.NewLoc()
loc.SetLocation("https://domain.com")
xml.Add(loc)out, _ := xml.OutputString()
fmt.Println(out)
}// Output: https://domain.com2022-11-03T11:56:00.26065Z
```