From d6e117bb9aeb2bae23dedd51b59b6e6f139e8a4f Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 17 May 2024 12:25:49 +0200 Subject: feat: exit after rebuilding index if `--replace` is specified --- searchix.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'searchix.go') diff --git a/searchix.go b/searchix.go index 59235cd..a369f73 100644 --- a/searchix.go +++ b/searchix.go @@ -87,6 +87,9 @@ func main() { if err != nil { log.Fatalf("Failed to build index: %v", err) } + if *replace { + return + } } c := make(chan os.Signal, 2) -- cgit 1.4.1