stronger kind tests and validation
This commit is contained in:
@@ -132,6 +132,8 @@ func BuildReport(ctx context.Context, reader RecordReader, writer ReportWriter,
|
||||
buysCount++
|
||||
} else if rec.Kind().Is(KindSell) {
|
||||
sellsCount++
|
||||
} else if !rec.Kind().Valid() {
|
||||
return fmt.Errorf("cannot process Kind(%d)", rec.Kind())
|
||||
}
|
||||
|
||||
lastTimestamp = rec.Timestamp()
|
||||
|
||||
Reference in New Issue
Block a user