code: func handleProgress(ch <-chan *migrator.ProgressUpdate, doneCh <-chan struct{}) {
  	var lastOp string
  	var lastProgress float64
  	lastFlush := time.Now()
  	for {
  		select {
  		case update := <-ch:
  			switch {
  			case lastOp != update.Op:
  				lastProgress = update.Progress
  				lastOp = update.Op
  				fmt.Println(update.Op)
  				fmt.Printf("%.2f%%\n", update.Progress)
  
  			case update.Progress-lastProgress >= 5:
  				fallthrough
  
  			case time.Now().Sub(lastFlush) > time.Second:
  				fallthrough
  
  			case update.Progress == 100:
  				lastFlush = time.Now()
  				lastProgress = update.Progress
  				fmt.Printf("%.2f%%\n", update.Progress)
  			}
  		case <-doneCh:
  			return
  		}
  	}
  }
docs: // handleProgress is used to dump progress information to the console while
  // a migration is in flight. This allows the user to monitor a migration.