func ScrapedTag(qb models.TagReader, s *models.ScrapedTag) error {
	if s.StoredID != nil {
		return nil
	}

	t, err := tag.ByName(qb, s.Name)

	if err != nil {
		return err
	}

	if t == nil {
		// try matching by alias
		t, err = tag.ByAlias(qb, s.Name)
		if err != nil {
			return err
		}
	}

	if t == nil {
		// ignore - cannot match
		return nil
	}

	id := strconv.Itoa(t.ID)
	s.StoredID = &id
	return nil
}
// ScrapedTag matches the provided tag with the tags
// in the database and sets the ID field if one is found.
ScrapedTag matches the provided tag with the tags
in the database and sets the ID field if one is found.
// ScrapedTag matches the provided tag with the tags // in the database and sets the ID field if one is found .
func ScrapedTag(qb models.TagReader, s *models.ScrapedTag) error {
	if s.StoredID != nil {
		return nil
	}
	t, err := tag.ByName(qb, s.Name)
	if err != nil {
		return err
	}
	if t == nil {
		t, err = tag.ByAlias(qb, s.Name)
		if err != nil {
			return err
		}
	}
	if t == nil {
		return nil
	}
	id := strconv.Itoa(t.ID)
	s.StoredID = &id
	return nil
}
func ScrapedTag ( qb models . TagReader , s * models . ScrapedTag ) error { if s . StoredID != nil { return nil } t , err := tag . ByName ( qb , s . Name ) if err != nil { return err } if t == nil { t , err = tag . ByAlias ( qb , s . Name ) if err != nil { return err } } if t == nil { return nil } id := strconv . Itoa ( t . ID ) s . StoredID = & id return nil }
ScrapedTag matches the provided tag with the tags
in the database and sets the ID field if one is found.
ScrapedTag matches the provided tag with the tags in the database and sets the ID field if one is found .
// try matching by alias // ignore - cannot match