aboutsummaryrefslogtreecommitdiffhomepage
path: root/resources
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-01-28 22:34:10 +0100
committerBjørn Erik Pedersen <[email protected]>2024-01-28 23:14:09 +0100
commita795acbcd8b18aa4af384d5c03f30740361c8fcf (patch)
tree0dbf7b000681a738b892c5235daf52c63cda88b9 /resources
parent982d9513e71b3d48e20cfa38454a0e1215a8d963 (diff)
downloadhugo-a795acbcd8b18aa4af384d5c03f30740361c8fcf.tar.gz
hugo-a795acbcd8b18aa4af384d5c03f30740361c8fcf.zip
all: Run gofumpt -l -w .
Diffstat (limited to 'resources')
-rw-r--r--resources/images/color.go1
-rw-r--r--resources/page/page_matcher_test.go4
-rw-r--r--resources/resource_factories/create/remote_test.go2
-rw-r--r--resources/resource_transformers/tocss/dartsass/dartsass_integration_test.go5
-rw-r--r--resources/resource_transformers/tocss/scss/client_extended.go1
-rw-r--r--resources/resource_transformers/tocss/scss/scss_integration_test.go3
6 files changed, 1 insertions, 15 deletions
diff --git a/resources/images/color.go b/resources/images/color.go
index fe891fe88..71872a30e 100644
--- a/resources/images/color.go
+++ b/resources/images/color.go
@@ -50,7 +50,6 @@ func ColorToHexString(c color.Color) string {
r, g, b, a := c.RGBA()
rgba := color.RGBA{uint8(r), uint8(g), uint8(b), uint8(a)}
return fmt.Sprintf("#%.2x%.2x%.2x", rgba.R, rgba.G, rgba.B)
-
}
func hexStringToColor(s string) (color.Color, error) {
diff --git a/resources/page/page_matcher_test.go b/resources/page/page_matcher_test.go
index 2108d51c2..c27a2e9b2 100644
--- a/resources/page/page_matcher_test.go
+++ b/resources/page/page_matcher_test.go
@@ -28,8 +28,7 @@ func TestPageMatcher(t *testing.T) {
developmentTestSite := testSite{h: hugo.NewInfo(testConfig{environment: "development"}, nil)}
productionTestSite := testSite{h: hugo.NewInfo(testConfig{environment: "production"}, nil)}
- p1, p2, p3 :=
- &testPage{path: "/p1", kind: "section", lang: "en", site: developmentTestSite},
+ p1, p2, p3 := &testPage{path: "/p1", kind: "section", lang: "en", site: developmentTestSite},
&testPage{path: "p2", kind: "page", lang: "no", site: productionTestSite},
&testPage{path: "p3", kind: "page", lang: "en"}
@@ -154,7 +153,6 @@ func TestDecodeCascadeConfig(t *testing.T) {
got, err = DecodeCascadeConfig(nil)
c.Assert(err, qt.IsNil)
c.Assert(got, qt.IsNotNil)
-
}
type testConfig struct {
diff --git a/resources/resource_factories/create/remote_test.go b/resources/resource_factories/create/remote_test.go
index a443a0633..21314ad34 100644
--- a/resources/resource_factories/create/remote_test.go
+++ b/resources/resource_factories/create/remote_test.go
@@ -81,7 +81,6 @@ func TestDecodeRemoteOptions(t *testing.T) {
c.Assert(err, isErr)
c.Assert(got, qt.DeepEquals, test.want)
})
-
}
}
@@ -114,7 +113,6 @@ func TestOptionsNewRequest(t *testing.T) {
c.Assert(err, qt.IsNil)
c.Assert(req.Method, qt.Equals, "GET")
c.Assert(req.Header["User-Agent"], qt.DeepEquals, []string{"foo"})
-
}
func TestCalculateResourceID(t *testing.T) {
diff --git a/resources/resource_transformers/tocss/dartsass/dartsass_integration_test.go b/resources/resource_transformers/tocss/dartsass/dartsass_integration_test.go
index c370a1cc8..dd4c1e5ca 100644
--- a/resources/resource_transformers/tocss/dartsass/dartsass_integration_test.go
+++ b/resources/resource_transformers/tocss/dartsass/dartsass_integration_test.go
@@ -293,7 +293,6 @@ T1: {{ $r.Content }}
b.AssertLogMatches(`Dart Sass: foo`)
b.AssertLogMatches(`Dart Sass: .*assets.*main.scss:1:0: bar`)
-
}
func TestTransformErrors(t *testing.T) {
@@ -347,7 +346,6 @@ T1: {{ $r.Content }}
b.Assert(fe.ErrorContext(), qt.IsNotNil)
b.Assert(fe.ErrorContext().Lines, qt.DeepEquals, []string{" $maincolor #eee;", "", "body {", "\tcolor: $maincolor;", "}"})
b.Assert(fe.ErrorContext().ChromaLexer, qt.Equals, "scss")
-
})
c.Run("error in import", func(c *qt.C) {
@@ -365,9 +363,7 @@ T1: {{ $r.Content }}
b.Assert(fe.ErrorContext(), qt.IsNotNil)
b.Assert(fe.ErrorContext().Lines, qt.DeepEquals, []string{"/* comment line 1 */", "$foocolor #ccc;", "", "foo {"})
b.Assert(fe.ErrorContext().ChromaLexer, qt.Equals, "scss")
-
})
-
}
func TestOptionVars(t *testing.T) {
@@ -528,5 +524,4 @@ T1: {{ $r.Content }}
b.AssertLogMatches(`Dart Sass: .*assets.*main.scss:12:0: number`)
b.AssertLogMatches(`Dart Sass: .*assets.*main.scss:13:0: number`)
b.AssertLogMatches(`Dart Sass: .*assets.*main.scss:14:0: number`)
-
}
diff --git a/resources/resource_transformers/tocss/scss/client_extended.go b/resources/resource_transformers/tocss/scss/client_extended.go
index bfee39499..c9b347c4c 100644
--- a/resources/resource_transformers/tocss/scss/client_extended.go
+++ b/resources/resource_transformers/tocss/scss/client_extended.go
@@ -47,7 +47,6 @@ func (c *Client) ToCSS(res resources.ResourceTransformer, opts Options) (resourc
}
return res.Transform(&toCSSTransformation{c: c, options: internalOptions})
-
}
type toCSSTransformation struct {
diff --git a/resources/resource_transformers/tocss/scss/scss_integration_test.go b/resources/resource_transformers/tocss/scss/scss_integration_test.go
index d0dd65e20..4d7d9d710 100644
--- a/resources/resource_transformers/tocss/scss/scss_integration_test.go
+++ b/resources/resource_transformers/tocss/scss/scss_integration_test.go
@@ -228,7 +228,6 @@ T1: {{ $r.Content }}
b.Assert(fe.ErrorContext(), qt.IsNotNil)
b.Assert(fe.ErrorContext().Lines, qt.DeepEquals, []string{"/* comment line 4 */", "", "$maincolor #eee;", "", "body {"})
b.Assert(fe.ErrorContext().ChromaLexer, qt.Equals, "scss")
-
})
c.Run("error in import", func(c *qt.C) {
@@ -245,9 +244,7 @@ T1: {{ $r.Content }}
b.Assert(fe.ErrorContext(), qt.IsNotNil)
b.Assert(fe.ErrorContext().Lines, qt.DeepEquals, []string{"/* comment line 1 */", "$foocolor #ccc;", "", "foo {"})
b.Assert(fe.ErrorContext().ChromaLexer, qt.Equals, "scss")
-
})
-
}
func TestOptionVars(t *testing.T) {