code: func (p *progressLogger) loopB(tick *time.Ticker, ch <-chan progress.Report) error {
  	var r progress.Report
  	var ok bool
  	var err error
  
  	for ok = true; ok; {
  		select {
  		case r, ok = <-ch:
  			if !ok {
  				break
  			}
  			err = r.Error()
  		case <-tick.C:
  			line := fmt.Sprintf("\r%s", p.prefix)
  			if r != nil {
  				line += fmt.Sprintf("(%.0f%%", r.Percentage())
  				detail := r.Detail()
  				if detail != "" {
  					line += fmt.Sprintf(", %s", detail)
  				}
  				line += ")"
  			}
  			p.flag.Log(line)
  		}
  	}
  
  	return err
  }
docs: // loopA runs after Sink() has been called.