Chore: use any rather than interface{} (#74066)

This commit is contained in:
Ryan McKinley
2023-08-30 18:46:47 +03:00
committed by GitHub
parent 3e272d2bda
commit 025b2f3011
525 changed files with 2528 additions and 2528 deletions
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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)