Skip to content

Commit

Permalink
chore: review suggestions, use t.Cleanup(cancel)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush008 committed Sep 3, 2024
1 parent 24ae329 commit 80f7815
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions qdrant/collections.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,12 @@ func (c *Client) DeleteCollection(ctx context.Context, collectionName string) er
res, err := c.GetCollectionsClient().Delete(ctx, &DeleteCollection{
CollectionName: collectionName,
})

if err != nil {
return newQdrantErr(err, "DeleteCollection", collectionName)
}

if !res.GetResult() {
return newQdrantErr(errors.New("failed to delete collection"), "DeleteCollection", collectionName)
}

return nil
}

Expand Down
2 changes: 1 addition & 1 deletion qdrant/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
)

//nolint:revive // The linter says qdrant.QdrantErr stutters, but it's an apt name.
//nolint:revive // The linter says qdrant.QdrantError stutters, but it's an apt name.
type QdrantError struct {
operationName string
context string
Expand Down

0 comments on commit 80f7815

Please sign in to comment.