func marshalScrapedGalleries(content []models.ScrapedContent) ([]*models.ScrapedGallery, error) {
	var ret []*models.ScrapedGallery
	for _, c := range content {
		if c == nil {
			// graphql schema requires galleries to be non-nil
			continue
		}

		switch g := c.(type) {
		case *models.ScrapedGallery:
			ret = append(ret, g)
		case models.ScrapedGallery:
			ret = append(ret, &g)
		default:
			return nil, fmt.Errorf("%w: cannot turn ScrapedContent into ScrapedGallery", models.ErrConversion)
		}
	}

	return ret, nil
}
// marshalScrapedGalleries converts ScrapedContent into ScrapedGallery. If
// conversion fails, an error is returned.
marshalScrapedGalleries converts ScrapedContent into ScrapedGallery. If
conversion fails, an error is returned.
// marshalScrapedGalleries converts ScrapedContent into ScrapedGallery . If // conversion fails an error is returned .
func marshalScrapedGalleries(content []models.ScrapedContent) ([]*models.ScrapedGallery, error) {
	var ret []*models.ScrapedGallery
	for _, c := range content {
		if c == nil {
			continue
		}
		switch g := c.(type) {
		case *models.ScrapedGallery:
			ret = append(ret, g)
		case models.ScrapedGallery:
			ret = append(ret, &g)
		default:
			return nil, fmt.Errorf("%w: cannot turn ScrapedContent into ScrapedGallery", models.ErrConversion)
		}
	}
	return ret, nil
}
func marshalScrapedGalleries ( content [ ] models . ScrapedContent ) ( [ ] * models . ScrapedGallery , error ) { var ret [ ] * models . ScrapedGallery for _ , c := range content { if c == nil { continue } switch g := c . ( type ) { case * models . ScrapedGallery : ret = append ( ret , g ) case models . ScrapedGallery : ret = append ( ret , & g ) default : return nil , fmt . Errorf ( " " , models . ErrConversion ) } } return ret , nil }
marshalScrapedGalleries converts ScrapedContent into ScrapedGallery.
marshalScrapedGalleries converts ScrapedContent into ScrapedGallery .
// graphql schema requires galleries to be non-nil