Chore: use any rather than interface{} (#74066)
This commit is contained in:
@@ -272,11 +272,11 @@ type ConditionQueryJSON struct {
|
||||
|
||||
type ConditionReducerJSON struct {
|
||||
Type string `json:"type"`
|
||||
// Params []interface{} `json:"params"` (Unused)
|
||||
// Params []any `json:"params"` (Unused)
|
||||
}
|
||||
|
||||
// UnmarshalConditionsCmd creates a new ConditionsCmd.
|
||||
func UnmarshalConditionsCmd(rawQuery map[string]interface{}, refID string) (*ConditionsCmd, error) {
|
||||
func UnmarshalConditionsCmd(rawQuery map[string]any, refID string) (*ConditionsCmd, error) {
|
||||
jsonFromM, err := json.Marshal(rawQuery["conditions"])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to remarshal classic condition body: %w", err)
|
||||
|
||||
@@ -695,7 +695,7 @@ func TestUnmarshalConditionsCmd(t *testing.T) {
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
var rq map[string]interface{}
|
||||
var rq map[string]any
|
||||
|
||||
err := json.Unmarshal([]byte(tt.rawJSON), &rq)
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user