mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 17:27:08 +08:00
1 parent
cef4756217
commit
b8ed92221b
8 files changed
+65
-21
No files matched your search
+4
-2
@@ -137,9 +137,11 @@ func Convert(ctx context.Context, source io.ReaderAt, size int64, output io.Writ
|
||||
return err
|
||||
}
|
||||
if options.OnProgress != nil {
|
||||
return options.OnProgress(ConvertProgress{Stage: stage, Completed: completed, Total: total})
|
||||
if err := options.OnProgress(ConvertProgress{Stage: stage, Completed: completed, Total: total}); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
return ctx.Err()
|
||||
}
|
||||
writeProgress := func(stage string, completed, total int) error {
|
||||
if stage == "write" {
|
||||
|
||||
Reference in new issue
Block a user