mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
@@ -57,7 +57,7 @@ func New(rs *resources.Spec) *Client {
|
||||
return &Client{rs: rs}
|
||||
}
|
||||
|
||||
func DecodeOptions(m map[string]interface{}) (opts Options, err error) {
|
||||
func DecodeOptions(m map[string]any) (opts Options, err error) {
|
||||
if m == nil {
|
||||
return
|
||||
}
|
||||
@@ -165,11 +165,11 @@ func (t *postcssTransformation) Transform(ctx *resources.ResourceTransformationC
|
||||
}
|
||||
}
|
||||
|
||||
var cmdArgs []interface{}
|
||||
var cmdArgs []any
|
||||
|
||||
if configFile != "" {
|
||||
logger.Infoln("postcss: use config file", configFile)
|
||||
cmdArgs = []interface{}{"--config", configFile}
|
||||
cmdArgs = []any{"--config", configFile}
|
||||
}
|
||||
|
||||
if optArgs := t.options.toArgs(); len(optArgs) > 0 {
|
||||
|
@@ -31,14 +31,14 @@ import (
|
||||
// Issue 6166
|
||||
func TestDecodeOptions(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
opts1, err := DecodeOptions(map[string]interface{}{
|
||||
opts1, err := DecodeOptions(map[string]any{
|
||||
"no-map": true,
|
||||
})
|
||||
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Assert(opts1.NoMap, qt.Equals, true)
|
||||
|
||||
opts2, err := DecodeOptions(map[string]interface{}{
|
||||
opts2, err := DecodeOptions(map[string]any{
|
||||
"noMap": true,
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user