OnComplete comment
Vladimir Bauer
8 years ago
| 44 | 44 | mpb.PrependDecorators( |
| 45 | 45 | // Display our name with one space on the right |
| 46 | 46 | decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}), |
| 47 | // Replace ETA decorator with message, OnComplete event | |
| 47 | // Replace ETA decorator with "done" message, OnComplete event | |
| 48 | 48 | decor.OnComplete( |
| 49 | 49 | // ETA decorator with default eta age, and width reservation of 4 |
| 50 | decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 4}), | |
| 51 | "done", | |
| 50 | decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 4}), "done", | |
| 52 | 51 | ), |
| 53 | 52 | ), |
| 54 | 53 | mpb.AppendDecorators( |
| 87 | 86 | decor.Percentage(decor.WCSyncWidth), |
| 88 | 87 | ), |
| 89 | 88 | mpb.AppendDecorators( |
| 90 | // Replace ETA decorator with message, OnComplete event | |
| 89 | // Replace ETA decorator with "done" message, OnComplete event | |
| 91 | 90 | decor.OnComplete( |
| 92 | 91 | // ETA decorator with default eta age, and width reservation of 3 |
| 93 | decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 3}), "done!", | |
| 92 | decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 3}), "done", | |
| 94 | 93 | ), |
| 95 | 94 | ), |
| 96 | 95 | ) |
| 30 | 30 | decor.Percentage(decor.WCSyncWidth), |
| 31 | 31 | ), |
| 32 | 32 | mpb.AppendDecorators( |
| 33 | // Replace ETA decorator with message, OnComplete event | |
| 33 | // Replace ETA decorator with "done" message, OnComplete event | |
| 34 | 34 | decor.OnComplete( |
| 35 | 35 | // ETA decorator with default eta age, and width reservation of 3 |
| 36 | decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 3}), "done!", | |
| 36 | decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 3}), "done", | |
| 37 | 37 | ), |
| 38 | 38 | ), |
| 39 | 39 | ) |
| 25 | 25 | mpb.PrependDecorators( |
| 26 | 26 | // Display our name with one space on the right |
| 27 | 27 | decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}), |
| 28 | // Replace ETA decorator with message, OnComplete event | |
| 28 | // Replace ETA decorator with "done" message, OnComplete event | |
| 29 | 29 | decor.OnComplete( |
| 30 | 30 | // ETA decorator with default eta age, and width reservation of 4 |
| 31 | decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 4}), | |
| 32 | "done", | |
| 31 | decor.ETA(decor.ET_STYLE_GO, 0, startBlock, decor.WC{W: 4}), "done", | |
| 33 | 32 | ), |
| 34 | 33 | ), |
| 35 | 34 | mpb.AppendDecorators( |