blob: 76ebdcf964097b8ac482b7dff72fa7ffaa4959bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
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)
}
}
|