func (ct *Crontab) getFilesToImport(localFiles []string, remoteFiles sirene.RemoteFiles) sirene.RemoteFiles {
	result := sirene.RemoteFiles{}
	for _, remoteFile := range remoteFiles {
		if !ct.isAlreadyImported(localFiles, remoteFile.FileName) {
			result = append(result, remoteFile)
		}
	}
	return result
}
getFilesToImport is a function used to filter a slice of RemoteFile with a slice of
string. If the file name is present in the RemoteFiles, they are evicted from
the returned slice
package logic
import (
	"github.com/jasonlvhit/gocron"
	"github.com/sirupsen/logrus"
	"github.com/jclebreton/opensirene/conf"
	"github.com/jclebreton/opensirene/database"
	"github.com/jclebreton/opensirene/opendata/gouvfr/sirene"
)
type Crontab struct {
	PgxClient *database.PgxClient
	Config    conf.Crontab
}
func (ct *Crontab) getDatabaseStatus() ([]string, error) {
	rows, err := ct.PgxClient.Conn.Query("SELECT filename FROM history WHERE is_success=true")
	if err != nil {
		return nil, err
	}
	var result []string
	for rows.Next() {
		var filename string
		if err := rows.Scan(&filename); err != nil {
			return nil, err
		}
		result = append(result, filename)
	}
	return result, nil
}