diff options
Diffstat (limited to 'minifiers')
-rw-r--r-- | minifiers/config.go | 2 | ||||
-rw-r--r-- | minifiers/config_test.go | 6 | ||||
-rw-r--r-- | minifiers/minifiers_test.go | 24 |
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, }, }, |