all repos — searchix @ 1aa991ae1f1a426424549c92060b204114c8b3c2

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

refactor: deduce index path automatically from config.DataPath

Alan Pearce
commit

1aa991ae1f1a426424549c92060b204114c8b3c2

parent

48423548f4718886d32a87ddd65d5ee2620fd8c8

1 file changed, 1 insertion(+), 2 deletions(-)

changed files
M import/main.goimport/main.go
@@ -22,7 +22,6 @@ ConfigFile string `conf:"short:c"`
LogLevel slog.Level `conf:"default:INFO"` Timeout time.Duration `conf:"default:30m,help:maximum time to wait for all fetchers and importers combined"` Replace bool `conf:"default:false,help:whether to remove existing database, if exists"` - IndexPath string `conf:"default:data/index.bleve"` } func main() {
@@ -51,7 +50,7 @@
return } - indexer, err := search.NewIndexer(runtimeConfig.IndexPath, runtimeConfig.Replace) + indexer, err := search.NewIndexer(cfg.DataPath, runtimeConfig.Replace) if err != nil { log.Fatalf("Failed to create indexer: %v", err) }