aboutsummaryrefslogtreecommitdiffhomepage
path: root/minifiers
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-03-17 22:03:27 +0100
committerBjørn Erik Pedersen <[email protected]>2022-03-17 22:03:27 +0100
commitb80853de90b10171155b8f3fde47d64ec7bfa0dd (patch)
tree435d3dbf7a495a0c6ce64c9769e037179aa0d27b /minifiers
parent423594e03a906ef4150f433666ff588b022c3c92 (diff)
downloadhugo-b80853de90b10171155b8f3fde47d64ec7bfa0dd.tar.gz
hugo-b80853de90b10171155b8f3fde47d64ec7bfa0dd.zip
all: gofmt -w -r 'interface{} -> any' .
Updates #9687
Diffstat (limited to 'minifiers')
-rw-r--r--minifiers/config.go2
-rw-r--r--minifiers/config_test.go6
-rw-r--r--minifiers/minifiers_test.go24
3 files changed, 16 insertions, 16 deletions
diff --git a/minifiers/config.go b/minifiers/config.go
index 675e5d2b8..135e39b86 100644
--- a/minifiers/config.go
+++ b/minifiers/config.go
@@ -124,7 +124,7 @@ func decodeConfig(cfg config.Provider) (conf minifyConfig, err error) {
func init() {
docsProvider := func() docshelper.DocProvider {
- return docshelper.DocProvider{"config": map[string]interface{}{"minify": parser.LowerCaseCamelJSONMarshaller{Value: defaultConfig}}}
+ return docshelper.DocProvider{"config": map[string]any{"minify": parser.LowerCaseCamelJSONMarshaller{Value: defaultConfig}}}
}
docshelper.AddDocProviderFunc(docsProvider)
}
diff --git a/minifiers/config_test.go b/minifiers/config_test.go
index fca56b7f1..e932fe856 100644
--- a/minifiers/config_test.go
+++ b/minifiers/config_test.go
@@ -25,10 +25,10 @@ func TestConfig(t *testing.T) {
c := qt.New(t)
v := config.New()
- v.Set("minify", map[string]interface{}{
+ v.Set("minify", map[string]any{
"disablexml": true,
- "tdewolff": map[string]interface{}{
- "html": map[string]interface{}{
+ "tdewolff": map[string]any{
+ "html": map[string]any{
"keepwhitespace": false,
},
},
diff --git a/minifiers/minifiers_test.go b/minifiers/minifiers_test.go
index 9866f67da..ce429c98a 100644
--- a/minifiers/minifiers_test.go
+++ b/minifiers/minifiers_test.go
@@ -77,10 +77,10 @@ func TestNew(t *testing.T) {
func TestConfigureMinify(t *testing.T) {
c := qt.New(t)
v := config.New()
- v.Set("minify", map[string]interface{}{
+ v.Set("minify", map[string]any{
"disablexml": true,
- "tdewolff": map[string]interface{}{
- "html": map[string]interface{}{
+ "tdewolff": map[string]any{
+ "html": map[string]any{
"keepwhitespace": true,
},
},
@@ -137,8 +137,8 @@ func TestJSONRoundTrip(t *testing.T) {
}`} {
var b bytes.Buffer
- m1 := make(map[string]interface{})
- m2 := make(map[string]interface{})
+ m1 := make(map[string]any)
+ m2 := make(map[string]any)
c.Assert(json.Unmarshal([]byte(test), &m1), qt.IsNil)
c.Assert(m.Minify(media.JSONType, &b, strings.NewReader(test)), qt.IsNil)
c.Assert(json.Unmarshal(b.Bytes(), &m2), qt.IsNil)
@@ -172,13 +172,13 @@ func TestBugs(t *testing.T) {
func TestDecodeConfigDecimalIsNowPrecision(t *testing.T) {
c := qt.New(t)
v := config.New()
- v.Set("minify", map[string]interface{}{
+ v.Set("minify", map[string]any{
"disablexml": true,
- "tdewolff": map[string]interface{}{
- "css": map[string]interface{}{
+ "tdewolff": map[string]any{
+ "css": map[string]any{
"decimal": 3,
},
- "svg": map[string]interface{}{
+ "svg": map[string]any{
"decimal": 3,
},
},
@@ -195,9 +195,9 @@ func TestDecodeConfigDecimalIsNowPrecision(t *testing.T) {
func TestDecodeConfigKeepWhitespace(t *testing.T) {
c := qt.New(t)
v := config.New()
- v.Set("minify", map[string]interface{}{
- "tdewolff": map[string]interface{}{
- "html": map[string]interface{}{
+ v.Set("minify", map[string]any{
+ "tdewolff": map[string]any{
+ "html": map[string]any{
"keepEndTags": false,
},
},