From a9a61ac9c73b4b1c22ab204eda1c625ea52c9cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Gill=C3=A9?= Date: Sat, 10 Feb 2024 10:21:13 +0100 Subject: [PATCH] Don't allow nResults < 0 --- query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query.go b/query.go index 5f1c80b..2285bab 100644 --- a/query.go +++ b/query.go @@ -39,7 +39,7 @@ func (c *Collection) Query(ctx context.Context, queryText string, nResults int, return nil, nil } - if nResults == 0 { + if nResults <= 0 { return nil, errors.New("nResults must be > 0") }