Chore: use any rather than interface{} (#74066)
This commit is contained in:
@@ -49,7 +49,7 @@ func TestDeleteExpiredVersions(t *testing.T) {
|
||||
|
||||
t.Run("Clean up old dashboard versions successfully", func(t *testing.T) {
|
||||
dashboardVersionStore.ExptectedDeletedVersions = 4
|
||||
dashboardVersionStore.ExpectedVersions = []interface{}{1, 2, 3, 4}
|
||||
dashboardVersionStore.ExpectedVersions = []any{1, 2, 3, 4}
|
||||
err := dashboardVersionService.DeleteExpired(context.Background(), &dashver.DeleteExpiredVersionsCommand{DeletedRows: 4})
|
||||
require.Nil(t, err)
|
||||
})
|
||||
@@ -147,7 +147,7 @@ func TestListDashboardVersions(t *testing.T) {
|
||||
type FakeDashboardVersionStore struct {
|
||||
ExpectedDashboardVersion *dashver.DashboardVersion
|
||||
ExptectedDeletedVersions int64
|
||||
ExpectedVersions []interface{}
|
||||
ExpectedVersions []any
|
||||
ExpectedListVersions []*dashver.DashboardVersion
|
||||
ExpectedError error
|
||||
}
|
||||
@@ -160,11 +160,11 @@ func (f *FakeDashboardVersionStore) Get(ctx context.Context, query *dashver.GetD
|
||||
return f.ExpectedDashboardVersion, f.ExpectedError
|
||||
}
|
||||
|
||||
func (f *FakeDashboardVersionStore) GetBatch(ctx context.Context, cmd *dashver.DeleteExpiredVersionsCommand, perBatch int, versionsToKeep int) ([]interface{}, error) {
|
||||
func (f *FakeDashboardVersionStore) GetBatch(ctx context.Context, cmd *dashver.DeleteExpiredVersionsCommand, perBatch int, versionsToKeep int) ([]any, error) {
|
||||
return f.ExpectedVersions, f.ExpectedError
|
||||
}
|
||||
|
||||
func (f *FakeDashboardVersionStore) DeleteBatch(ctx context.Context, cmd *dashver.DeleteExpiredVersionsCommand, versionIdsToDelete []interface{}) (int64, error) {
|
||||
func (f *FakeDashboardVersionStore) DeleteBatch(ctx context.Context, cmd *dashver.DeleteExpiredVersionsCommand, versionIdsToDelete []any) (int64, error) {
|
||||
return f.ExptectedDeletedVersions, f.ExpectedError
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user