code: func (p *progressLogger) loopA() {
  	var err error
  
  	defer p.wg.Done()
  
  	tick := time.NewTicker(100 * time.Millisecond)
  	defer tick.Stop()
  
  	called := false
  
  	for stop := false; !stop; {
  		select {
  		case ch := <-p.sink:
  			err = p.loopB(tick, ch)
  			stop = true
  			called = true
  		case <-p.done:
  			stop = true
  		case <-tick.C:
  			line := fmt.Sprintf("\r%s", p.prefix)
  			p.flag.Log(line)
  		}
  	}
  
  	if err != nil && err != io.EOF {
  		p.flag.Log(fmt.Sprintf("\r%sError: %s\n", p.prefix, err))
  	} else if called {
  		p.flag.Log(fmt.Sprintf("\r%sOK\n", p.prefix))
  	}
  }
docs: // loopA runs before Sink() has been called.