Skip to content

Commit

Permalink
refactor: move common func to backupstore lib
Browse files Browse the repository at this point in the history
ref: 6514

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
  • Loading branch information
c3y1huang authored and David Ko committed Sep 18, 2023
1 parent de34da9 commit fd81656
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engineapi/backups.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

"github.com/longhorn/backupstore"

btypes "github.com/longhorn/backupstore/types"
etypes "github.com/longhorn/longhorn-engine/pkg/types"

"github.com/longhorn/longhorn-manager/datastore"
Expand Down Expand Up @@ -186,8 +187,8 @@ func parseBackupNamesList(output, volumeName string) ([]string, error) {
}

backupNames := []string{}
if volumeData.Messages[string(backupstore.MessageTypeError)] != "" {
return backupNames, errors.New(volumeData.Messages[string(backupstore.MessageTypeError)])
if volumeData.Messages[string(btypes.MessageTypeError)] != "" {
return backupNames, errors.New(volumeData.Messages[string(btypes.MessageTypeError)])
}
for backupName := range volumeData.Backups {
backupNames = append(backupNames, backupName)
Expand Down

0 comments on commit fd81656

Please sign in to comment.