all: Run gofumpt -l -w .

This commit is contained in:
Bjørn Erik Pedersen
2024-01-28 22:34:10 +01:00
parent 982d9513e7
commit a795acbcd8
77 changed files with 102 additions and 203 deletions

View File

@@ -56,23 +56,26 @@ func TestUnmarshalXML(t *testing.T) {
"guid": "https://example.com/2021/11/30/example-title/",
"link": "https://example.com/2021/11/30/example-title/",
"pubDate": "Tue, 30 Nov 2021 15:00:00 +0000",
"title": "Example title"},
"title": "Example title",
},
"language": "en-us",
"lastBuildDate": "Fri, 08 Jan 2021 14:44:10 +0000",
"link": []any{"https://example.com/", map[string]any{
"-href": "https://example.com/feed.xml",
"-rel": "self",
"-type": "application/rss+xml"}},
"-type": "application/rss+xml",
}},
"title": "Example feed",
}}
},
}
d := Default
m, err := d.Unmarshal([]byte(xmlDoc), XML)
c.Assert(err, qt.IsNil)
c.Assert(m, qt.DeepEquals, expect)
}
func TestUnmarshalToMap(t *testing.T) {
c := qt.New(t)

View File

@@ -46,5 +46,4 @@ func TestItemValTyped(t *testing.T) {
c.Assert(Item{low: 0, high: len(source)}.ValTyped(source), qt.Equals, "truex")
source = []byte("xtrue")
c.Assert(Item{low: 0, high: len(source)}.ValTyped(source), qt.Equals, "xtrue")
}

View File

@@ -22,7 +22,6 @@ type lexerShortcodeState struct {
elementStepNum int // step number in element
paramElements int // number of elements (name + value = 2) found first
openShortcodes map[string]bool // set of shortcodes in open state
}
// Shortcode syntax