//GetValidationStatus returns a slice containing the stock records with a validationStatus equal to status
GetValidationStatus returns a slice containing the stock records with a validationStatus equal to status
// GetValidationStatus returns a slice containing the stock records with a validationStatus equal to status
func (sc *StockCache) GetValidationStatus(status core.ValidationStatusType) []core.SibylStockRecord {
	toReturn := make([]core.SibylStockRecord, 0, len(sc.stocks))
	sc.stocksMu.RLock()
	for _, stock := range sc.stocks {
		if stock.ValidationStatus == status {
			toReturn = append(toReturn, stock)
		}
	}
	sc.stocksMu.RUnlock()
	return toReturn
}
func ( sc * StockCache ) GetValidationStatus ( status core . ValidationStatusType ) [ ] core . SibylStockRecord { toReturn := make ( [ ] core . SibylStockRecord , 0 , len ( sc . stocks ) ) sc . stocksMu . RLock ( ) for _ , stock := range sc . stocks { if stock . ValidationStatus == status { toReturn = append ( toReturn , stock ) } } sc . stocksMu . RUnlock ( ) return toReturn }
GetValidationStatus returns a slice containing the stock records with a validationStatus equal to status
GetValidationStatus returns a slice containing the stock records with a validationStatus equal to status