all repos — searchix @ 495994761bc04fd9b46e65e389e8b2cda28f1020

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: use options struct for all arguments to index constructor

Alan Pearce
commit

495994761bc04fd9b46e65e389e8b2cda28f1020

parent

450ff2d51460c2f1e8b0679726d3a26cd8762359

1 file changed, 7 insertions(+), 3 deletions(-)

changed files
M internal/index/search_test.gointernal/index/search_test.go
@@ -27,9 +27,11 @@ t.Fatal(err)
} defer root.Close() - read, _, exists, err := index.OpenOrCreate(root, false, &index.Options{ + read, _, exists, err := index.OpenOrCreate(&index.Options{ Logger: log.Named("index"), + Root: root, BatchSize: cfg.Importer.BatchSize, + Force: false, LowMemory: false, }) if err != nil {
@@ -97,9 +99,11 @@ t.Fatal(err)
} defer root.Close() - read, _, exists, err := index.OpenOrCreate(root, false, &index.Options{ - Logger: log.Named("index"), + read, _, exists, err := index.OpenOrCreate(&index.Options{ + Force: false, LowMemory: false, + Logger: log.Named("index"), + Root: root, }) if err != nil { t.Fatal(err)