-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sorting by creation time when --detailed flag is not specified. #1405
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, will merge after fixing the issues.
internal/BackupTimeWithMetadata.go
Outdated
@@ -0,0 +1,8 @@ | |||
package internal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, separate file for one struct is an overkill, I suggest to move it to internal/backup_list_handler.go
internal/backup_util.go
Outdated
@@ -113,6 +140,27 @@ func SortBackupTimeSlices(backupTimes []BackupTime) { | |||
}) | |||
} | |||
|
|||
func SortBackupTimeWithMetadataSlices(backupTimes []BackupTimeWithMetadata) { | |||
order := ByCreationTime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if we always sort by the creation time why separate if down below? I suggest to remove it
f2b9f7f
to
eb3cf84
Compare
Pull request description
[Issue] (#1108)
Added GenericMetaInteractors for:
Interactors are used for fetching backup StartTime to sort backups by creation time.
Added sorting by creation time in DefaultHandleBackupList when
--detailed
flag is not specified.