code: func (p *expiredAuthzPurger) getWork(work chan string, query string, initialID string, purgeBefore time.Time, batchSize int64) (string, int, error) {
  	var idBatch []string
  	_, err := p.db.Select(
  		&idBatch,
  		query,
  		map[string]interface{}{
  			"id":      initialID,
  			"expires": purgeBefore,
  			"limit":   batchSize,
  		},
  	)
  	if err != nil && err != sql.ErrNoRows {
  		return "", 0, fmt.Errorf("Getting a batch: %s", err)
  	}
  	if len(idBatch) == 0 {
  		return initialID, 0, nil
  	}
  	var count int
  	var lastID string
  	for _, v := range idBatch {
  		work <- v
  		count++
  		lastID = v
  	}
  	return lastID, count, nil
  }
docs: // getWork selects a set of authorizations that expired before purgeBefore, bounded by batchSize,
  // that have IDs that are more than initialID from either the pendingAuthorizations or authz tables
  // and adds them to the work channel. It returns the last ID it selected and the number of IDs it
  // added to the work channel or an error.