Skip to content

Commit

Permalink
refactor: format variables according to standards
Browse files Browse the repository at this point in the history
  • Loading branch information
mingard committed Nov 4, 2022
1 parent c293412 commit b66c34f
Show file tree
Hide file tree
Showing 16 changed files with 483 additions and 252 deletions.
7 changes: 6 additions & 1 deletion boolean.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
package sitemap

// sitemap formatting with syntactic sugar. © Arthur Mingard 2022

// BoolStr is a string representation of a boolean.
type BoolStr string

const (
// Yes is a truthy string representation.
Yes BoolStr = "yes"
No BoolStr = "no"
// No is a falsy string representation.
No BoolStr = "no"
)
6 changes: 4 additions & 2 deletions example_xml_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package sitemap

// sitemap formatting with syntactic sugar. © Arthur Mingard 2022

import "fmt"

func ExampleNew() {
Expand All @@ -10,15 +12,15 @@ func ExampleNew() {
// Output: <?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"></urlset>
}

func ExampleSitemapXML_OutputString() {
func ExampleXML_OutputString() {
xml := New()

out, _ := xml.OutputString()
fmt.Println(out)
// Output: <?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"></urlset>
}

func ExampleSitemapXML_OutputPrettyString() {
func ExampleXML_OutputPrettyString() {
xml := New()

out, _ := xml.OutputPrettyString("", " ")
Expand Down
1 change: 1 addition & 0 deletions image.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package sitemap

// sitemap formatting with syntactic sugar. © Arthur Mingard 2022
// See https://developers.google.com/search/docs/crawling-indexing/sitemaps/image-sitemaps

import (
Expand Down
Loading

0 comments on commit b66c34f

Please sign in to comment.