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
@@ -31,7 +31,7 @@ func TestExternalAlertmanagerChoice(t *testing.T) {
OrgID: 1,
Type: datasources.DS_ALERTMANAGER,
URL: "http://localhost:9000",
JsonData: simplejson.NewFromAny(map[string]interface{}{
JsonData: simplejson.NewFromAny(map[string]any{
definitions.HandleGrafanaManagedAlerts: true,
}),
},
@@ -47,7 +47,7 @@ func TestExternalAlertmanagerChoice(t *testing.T) {
OrgID: 1,
Type: datasources.DS_ALERTMANAGER,
URL: "http://localhost:9000",
JsonData: simplejson.NewFromAny(map[string]interface{}{}),
JsonData: simplejson.NewFromAny(map[string]any{}),
},
},
statusCode: http.StatusBadRequest,
@@ -83,7 +83,7 @@ func TestExternalAlertmanagerChoice(t *testing.T) {
resp := sut.RoutePostNGalertConfig(ctx, definitions.PostableNGalertConfig{
AlertmanagersChoice: test.alertmanagerChoice,
})
var res map[string]interface{}
var res map[string]any
err := json.Unmarshal(resp.Body(), &res)
require.NoError(t, err)
require.Equal(t, test.message, res["message"])