1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-06-02 21:31:23 +00:00

Fix more lints

This commit is contained in:
Chongyi Zheng 2024-04-28 23:34:30 -04:00
parent 403e14525f
commit 75cd37990a
No known key found for this signature in database
GPG Key ID: 4B90B77407DA2359

View File

@ -134,17 +134,17 @@ func (b *Indexer) Delete(ctx context.Context, ids ...int64) error {
}
for _, id := range ids {
bulkIndexer.Add(ctx, esutil.BulkIndexerItem{
err = bulkIndexer.Add(ctx, esutil.BulkIndexerItem{
Action: "delete",
Index: b.inner.VersionedIndexName(),
DocumentID: fmt.Sprintf("%d", id),
})
if err != nil {
return err
}
}
if err := bulkIndexer.Close(context.Background()); err != nil {
return err
}
return nil
return bulkIndexer.Close(ctx)
}
// Search searches for issues by given conditions.