all: Run modernize -fix ./...

This commit is contained in:
Bjørn Erik Pedersen
2025-02-26 10:15:04 +01:00
parent b7ae24b9c2
commit 521911a576
141 changed files with 302 additions and 354 deletions

View File

@@ -141,7 +141,7 @@ func (c *Client) Concat(targetPath string, r resource.Resources) (resource.Resou
if resolvedm.MainType == media.Builtin.JavascriptType.MainType && resolvedm.SubType == media.Builtin.JavascriptType.SubType {
readers := make([]hugio.ReadSeekCloser, 2*len(rcsources)-1)
j := 0
for i := 0; i < len(rcsources); i++ {
for i := range rcsources {
if i > 0 {
readers[j] = hugio.NewReadSeekerNoOpCloserFromString("\n;\n")
j++

View File

@@ -31,7 +31,7 @@ func TestMultiReadSeekCloser(t *testing.T) {
hugio.NewReadSeekerNoOpCloserFromString("C"),
)
for i := 0; i < 3; i++ {
for range 3 {
s1 := helpers.ReaderToString(rc)
c.Assert(s1, qt.Equals, "ABC")
_, err := rc.Seek(0, 0)

View File

@@ -136,7 +136,7 @@ mediaTypes = ['text/plain']
{{ end }}
`
for i := 0; i < numPages; i++ {
for i := range numPages {
filesTemplate += fmt.Sprintf("-- content/post/p%d.md --\n", i)
}
@@ -153,7 +153,7 @@ mediaTypes = ['text/plain']
b.Build()
for i := 0; i < numPages; i++ {
for i := range numPages {
b.AssertFileContent(fmt.Sprintf("public/post/p%d/index.html", i), fmt.Sprintf("Content: Response for /post/p%d/.", i))
}
})