// NewSavedItemsRepo will attempt to connect to to MySQL and // return a SavedItemsRepo implementation. func NewSavedItemsRepo(cfg *mysql.Config) (SavedItemsRepo, error) { db, err := cfg.DB() if err != nil { return nil, err } return &MySQLSavedItemsRepo{db}, nil }
func NewMySQLDataRepo(cfg *mysql.Config) (DataRepo, error) { db, err := cfg.DB() return &MySQLDataRepo{db}, err }