File tree 1 file changed +14
-13
lines changed
1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -65,25 +65,26 @@ func realMain() int {
65
65
66
66
redisPassword := os .Getenv ("REDISDUMPGO_AUTH" )
67
67
68
- var progressNotifs chan redisdump.ProgressNotification
68
+ progressNotifs := make ( chan redisdump.ProgressNotification )
69
69
var wg sync.WaitGroup
70
- if ! (* silent ) {
71
- wg .Add (1 )
70
+ wg .Add (1 )
72
71
73
- progressNotifs = make ( chan redisdump. ProgressNotification )
74
- defer func () {
75
- close ( progressNotifs )
76
- wg . Wait ()
72
+ defer func () {
73
+ close ( progressNotifs )
74
+ wg . Wait ( )
75
+ if ! ( * silent ) {
77
76
fmt .Fprint (os .Stderr , "\n " )
78
- }()
77
+ }
78
+ }()
79
79
80
- go func () {
81
- for n := range progressNotifs {
80
+ go func () {
81
+ for n := range progressNotifs {
82
+ if ! (* silent ) {
82
83
drawProgressBar (os .Stderr , n .Done , n .Total , 50 )
83
84
}
84
- wg . Done ()
85
- } ()
86
- }
85
+ }
86
+ wg . Done ()
87
+ }()
87
88
88
89
logger := log .New (os .Stdout , "" , 0 )
89
90
if db == nil {
You can’t perform that action at this time.
0 commit comments