ran go fix
This commit is contained in:
@@ -83,10 +83,7 @@ func setDefaultWriteOptions(opts *WriteOptions) {
|
|||||||
|
|
||||||
func enforcePolicyRules(in []roots.ValidatedEvent, boltdb *bolt.DB, batchSize int) (queued []roots.ValidatedEvent, excluded []ExcludedEvent) {
|
func enforcePolicyRules(in []roots.ValidatedEvent, boltdb *bolt.DB, batchSize int) (queued []roots.ValidatedEvent, excluded []ExcludedEvent) {
|
||||||
for i := 0; i < len(in); i += batchSize {
|
for i := 0; i < len(in); i += batchSize {
|
||||||
end := i + batchSize
|
end := min(i+batchSize, len(in))
|
||||||
if end > len(in) {
|
|
||||||
end = len(in)
|
|
||||||
}
|
|
||||||
batch := in[i:end]
|
batch := in[i:end]
|
||||||
|
|
||||||
eventIDs := make([]string, 0, len(batch))
|
eventIDs := make([]string, 0, len(batch))
|
||||||
|
|||||||
Reference in New Issue
Block a user