restorer: use options struct

This commit is contained in:
Michael Eischer
2024-05-31 11:42:25 +02:00
parent 0fcd89f892
commit 2b50c2606c
5 changed files with 24 additions and 18 deletions

View File

@@ -31,7 +31,7 @@ func TestRestorerRestoreEmptyHardlinkedFileds(t *testing.T) {
},
}, noopGetGenericAttributes)
res := NewRestorer(repo, sn, false, nil)
res := NewRestorer(repo, sn, Options{})
res.SelectFilter = func(item string, dstpath string, node *restic.Node) (selectedForRestore bool, childMayBeSelected bool) {
return true, true
@@ -99,7 +99,7 @@ func TestRestorerProgressBar(t *testing.T) {
mock := &printerMock{}
progress := restoreui.NewProgress(mock, 0)
res := NewRestorer(repo, sn, false, progress)
res := NewRestorer(repo, sn, Options{Progress: progress})
res.SelectFilter = func(item string, dstpath string, node *restic.Node) (selectedForRestore bool, childMayBeSelected bool) {
return true, true
}