package dbstore import ( "fmt" "github.com/pablotron/cvez/feed" ) // Check data type, data format, and data version in NVD feed entry. func checkNvdData(dt feed.DataType, df feed.DataFormat, dv feed.DataVersion) error { // check data type if dt != feed.CveType { return fmt.Errorf("unknown data type: %s", dt) } // check data format if df != feed.MitreFormat { return fmt.Errorf("unknown data format: %s", df) } // check data version if dv != feed.V40 { return fmt.Errorf("unknown data version: %s", dv) } // return success return nil }