mirror of
https://git.sr.ht/~phw/scotty
synced 2025-05-11 02:27:05 +02:00
Show progress bars as aborted on export / import error
This commit is contained in:
parent
15d939e150
commit
aae5123c3d
12 changed files with 35 additions and 21 deletions
|
@ -213,6 +213,7 @@ type Progress struct {
|
|||
Total int64
|
||||
Elapsed int64
|
||||
Completed bool
|
||||
Aborted bool
|
||||
}
|
||||
|
||||
func (p Progress) FromImportResult(result ImportResult) Progress {
|
||||
|
@ -226,3 +227,8 @@ func (p Progress) Complete() Progress {
|
|||
p.Completed = true
|
||||
return p
|
||||
}
|
||||
|
||||
func (p Progress) Abort() Progress {
|
||||
p.Aborted = true
|
||||
return p
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue