Chore: use any rather than interface{} (#74066)
This commit is contained in:
@@ -68,7 +68,7 @@ func testIntegrationGetDashboardVersion(t *testing.T, fn getStore) {
|
||||
for i := 0; i < versionsToWrite-1; i++ {
|
||||
insertTestDashboard(t, ss, "test dash 53", 1, int64(i), false, "diff-all")
|
||||
}
|
||||
versionIDsToDelete := []interface{}{1, 2, 3, 4}
|
||||
versionIDsToDelete := []any{1, 2, 3, 4}
|
||||
res, err := dashVerStore.DeleteBatch(
|
||||
context.Background(),
|
||||
&dashver.DeleteExpiredVersionsCommand{DeletedRows: 4},
|
||||
@@ -101,7 +101,7 @@ func testIntegrationGetDashboardVersion(t *testing.T, fn getStore) {
|
||||
})
|
||||
|
||||
t.Run("Get all versions for an updated dashboard", func(t *testing.T) {
|
||||
updateTestDashboard(t, ss, savedDash, map[string]interface{}{
|
||||
updateTestDashboard(t, ss, savedDash, map[string]any{
|
||||
"tags": "different-tag",
|
||||
})
|
||||
query := dashver.ListDashboardVersionsQuery{DashboardID: savedDash.ID, OrgID: 1, Limit: 1000}
|
||||
@@ -134,13 +134,13 @@ var (
|
||||
)
|
||||
|
||||
func insertTestDashboard(t *testing.T, sqlStore db.DB, title string, orgId int64,
|
||||
folderId int64, isFolder bool, tags ...interface{}) *dashboards.Dashboard {
|
||||
folderId int64, isFolder bool, tags ...any) *dashboards.Dashboard {
|
||||
t.Helper()
|
||||
cmd := dashboards.SaveDashboardCommand{
|
||||
OrgID: orgId,
|
||||
FolderID: folderId,
|
||||
IsFolder: isFolder,
|
||||
Dashboard: simplejson.NewFromAny(map[string]interface{}{
|
||||
Dashboard: simplejson.NewFromAny(map[string]any{
|
||||
"id": nil,
|
||||
"title": title,
|
||||
"tags": tags,
|
||||
@@ -189,7 +189,7 @@ func insertTestDashboard(t *testing.T, sqlStore db.DB, title string, orgId int64
|
||||
return dash
|
||||
}
|
||||
|
||||
func updateTestDashboard(t *testing.T, sqlStore db.DB, dashboard *dashboards.Dashboard, data map[string]interface{}) {
|
||||
func updateTestDashboard(t *testing.T, sqlStore db.DB, dashboard *dashboards.Dashboard, data map[string]any) {
|
||||
t.Helper()
|
||||
|
||||
data["id"] = dashboard.ID
|
||||
|
||||
Reference in New Issue
Block a user