about summary refs log tree commit diff stats
path: root/import
diff options
context:
space:
mode:
authorAlan Pearce2024-05-13 21:50:14 +0200
committerAlan Pearce2024-05-13 22:25:46 +0200
commit6b40e0c0fa90f11be14a93f1d6275779fd645cac (patch)
tree0df5bea87242450829ca441d235c077a0e09a149 /import
parent2722f24af87f437ed9fcb8cc743ad1784141fd3a (diff)
downloadsearchix-6b40e0c0fa90f11be14a93f1d6275779fd645cac.tar.lz
searchix-6b40e0c0fa90f11be14a93f1d6275779fd645cac.tar.zst
searchix-6b40e0c0fa90f11be14a93f1d6275779fd645cac.zip
refactor: combine import and web server into one binary
Diffstat (limited to 'import')
-rw-r--r--import/main.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/import/main.go b/import/main.go
deleted file mode 100644
index 76ebdcf..0000000
--- a/import/main.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package main
-
-import (
-	"flag"
-	"log"
-	"log/slog"
-	"searchix/internal/config"
-	"searchix/internal/importer"
-)
-
-var (
-	replace    = flag.Bool("replace", false, "whether to replace existing database, if it exists")
-	configFile = flag.String("config", "config.toml", "config file to use")
-)
-
-func main() {
-	flag.Parse()
-
-	cfg, err := config.GetConfig(*configFile)
-	if err != nil {
-		log.Fatal(err)
-	}
-	slog.SetLogLoggerLevel(cfg.LogLevel)
-
-	err = importer.Start(cfg, *replace)
-	if err != nil {
-		log.Fatal(err)
-	}
-}