aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/index.go4
-rw-r--r--cmd/query.go3
2 files changed, 4 insertions, 3 deletions
diff --git a/cmd/index.go b/cmd/index.go
index 358182c..f3fa23f 100644
--- a/cmd/index.go
+++ b/cmd/index.go
@@ -106,9 +106,9 @@ func RunIndex(gFlags GlobalFlags, iFlags IndexFlags, db *data.Query) byte {
// switch in order to appease gopls...
switch iFlags.Subcommand {
case "build":
- err = db.Put(idx)
+ err = db.Put(context.Background(), idx)
case "update":
- err = db.Update(idx)
+ err = db.Update(context.Background(), idx)
}
if err != nil {
fmt.Fprintln(os.Stderr, "Error modifying index:", err)
diff --git a/cmd/query.go b/cmd/query.go
index 190289a..0db8d9b 100644
--- a/cmd/query.go
+++ b/cmd/query.go
@@ -1,6 +1,7 @@
package cmd
import (
+ "context"
"flag"
"fmt"
"os"
@@ -82,7 +83,7 @@ func RunQuery(gFlags GlobalFlags, qFlags QueryFlags, db *data.Query, searchQuery
return 1
}
- results, err := db.Execute(artifact)
+ results, err := db.Execute(context.Background(), artifact)
if err != nil {
fmt.Fprintln(os.Stderr, "Failed to execute query: ", err)
return 1