code: func PurgeUploads(ctx context.Context, driver storageDriver.StorageDriver, olderThan time.Time, actuallyDelete bool) ([]string, []error) {
  	logrus.Infof("PurgeUploads starting: olderThan=%s, actuallyDelete=%t", olderThan, actuallyDelete)
  	uploadData, errors := getOutstandingUploads(ctx, driver)
  	var deleted []string
  	for _, uploadData := range uploadData {
  		if uploadData.startedAt.Before(olderThan) {
  			var err error
  			logrus.Infof("Upload files in %s have older date (%s) than purge date (%s).  Removing upload directory.",
  				uploadData.containingDir, uploadData.startedAt, olderThan)
  			if actuallyDelete {
  				err = driver.Delete(ctx, uploadData.containingDir)
  			}
  			if err == nil {
  				deleted = append(deleted, uploadData.containingDir)
  			} else {
  				errors = append(errors, err)
  			}
  		}
  	}
  
  	logrus.Infof("Purge uploads finished.  Num deleted=%d, num errors=%d", len(deleted), len(errors))
  	return deleted, errors
  }
docs: // PurgeUploads deletes files from the upload directory
  // created before olderThan.  The list of files deleted and errors
  // encountered are returned