Codebase list golang-github-vbauerster-mpb / 0624c8e
start block channel must not be nil Vladimir Bauer 8 years ago
2 changed file(s) with 6 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
2020 //
2121 // `wcc` optional WC config
2222 func ETA(style int, age float64, sbCh chan time.Time, wcc ...WC) Decorator {
23 if sbCh == nil {
24 panic("start block channel must not be nil")
25 }
2326 var wc WC
2427 for _, widthConf := range wcc {
2528 wc = widthConf
181181 }
182182
183183 func speed(unit int, unitFormat string, age float64, sbCh chan time.Time, wcc ...WC) Decorator {
184 if sbCh == nil {
185 panic("start block channel must not be nil")
186 }
184187 var wc WC
185188 for _, widthConf := range wcc {
186189 wc = widthConf