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
@@ -29,7 +29,7 @@ func TestPluginProvisioner(t *testing.T) {
{PluginID: "test-plugin", OrgID: 2, Enabled: true},
{PluginID: "test-plugin-2", OrgID: 3, Enabled: false},
{PluginID: "test-plugin", OrgName: "Org 4", Enabled: true, SecureJSONData: map[string]string{"token": "secret"}},
{PluginID: "test-plugin-2", OrgID: 1, Enabled: true, JSONData: map[string]interface{}{"test": true}},
{PluginID: "test-plugin-2", OrgID: 1, Enabled: true, JSONData: map[string]any{"test": true}},
},
},
}
@@ -48,13 +48,13 @@ func TestPluginProvisioner(t *testing.T) {
ExpectedOrgID int64
ExpectedEnabled bool
ExpectedPluginVersion string
ExpectedJSONData map[string]interface{}
ExpectedJSONData map[string]any
ExpectedSecureJSONData map[string]string
}{
{ExpectedPluginID: "test-plugin", ExpectedOrgID: 2, ExpectedEnabled: true, ExpectedPluginVersion: "2.0.1"},
{ExpectedPluginID: "test-plugin-2", ExpectedOrgID: 3, ExpectedEnabled: false},
{ExpectedPluginID: "test-plugin", ExpectedOrgID: 4, ExpectedEnabled: true, ExpectedSecureJSONData: map[string]string{"token": "secret"}},
{ExpectedPluginID: "test-plugin-2", ExpectedOrgID: 1, ExpectedEnabled: true, ExpectedJSONData: map[string]interface{}{"test": true}},
{ExpectedPluginID: "test-plugin-2", ExpectedOrgID: 1, ExpectedEnabled: true, ExpectedJSONData: map[string]any{"test": true}},
}
for index, tc := range testCases {
+1 -1
View File
@@ -15,7 +15,7 @@ type appFromConfig struct {
Enabled bool
Pinned bool
PluginVersion string
JSONData map[string]interface{}
JSONData map[string]any
SecureJSONData map[string]string
}