From 6b40e0c0fa90f11be14a93f1d6275779fd645cac Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 13 May 2024 21:50:14 +0200 Subject: refactor: combine import and web server into one binary --- import/main.go | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 import/main.go (limited to 'import/main.go') 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) - } -} -- cgit 1.4.1