INNER CODE UNIT · Go
initLoaders
lamoda/gonkey · main.go:119
func initLoaders(storages storages, cfg config) fixtures.Loader {
if cfg.FixturesLocation == "" {
return nil
}
var fixturesLoader fixtures.Loader
switch {
case storages.db != nil || storages.aerospike != nil:
fixturesLoader = fixtures.NewLoader(&fixtures.Config{
DB: storages.db,
Aerospike: storages.aerospike,
Location: cfg.FixturesLocation,
Debug: cfg.Debug,
DbType: fixtures.FetchDbType(cfg.DbType),
})
case cfg.DbType == fixtures.RedisParam:
redisOptions, err := redis.ParseURL(cfg.RedisURL)
if err != nil {