mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-06-26 07:09:55 +02:00
fix progress bar
This commit is contained in:
parent
3524ce6d04
commit
49e7f27a59
@ -169,14 +169,15 @@ func LoadImages(path string, options *ImageOptions) ([]*Image, error) {
|
||||
|
||||
go func() {
|
||||
wg.Wait()
|
||||
bar.Close()
|
||||
close(imageOutput)
|
||||
}()
|
||||
|
||||
bar := NewBar(imageCount, "Processing", 1, 2)
|
||||
for image := range imageOutput {
|
||||
images = append(images, image)
|
||||
bar.Add(1)
|
||||
}
|
||||
bar.Close()
|
||||
|
||||
if len(images) == 0 {
|
||||
return nil, fmt.Errorf("image not found")
|
||||
|
Loading…
x
Reference in New Issue
Block a user