From d30e386491024e3740ac27039cd6b0dd5bb15334 Mon Sep 17 00:00:00 2001 From: David Schlachter Date: Thu, 8 Jan 2026 13:17:21 -0500 Subject: Fix argument validation --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 9dacd95..809dd9d 100644 --- a/main.go +++ b/main.go @@ -22,16 +22,16 @@ func main() { flag.Parse() - if dict == nil { + if *dict == "" { log.Fatal("The -dictionary flag cannot be an empty string. (If not provided, it defaults to dictionary.sqlite3.)") } - if rawDict == nil { + if *rawDict == "" { log.Fatal("The -rawDictionary flag cannot be an empty string. (If not provided, it defaults to aw-wiktextract-data.jsonl.)") } - if deckName == nil { + if *deckName == "" { log.Fatal("The -deck flag must be provided (name of the deck where Anki cards will be created).") } - if modelName == nil { + if *modelName == "" { log.Fatal("The -model flag must be provided. This is the name of the card type ('model') for any Anki cards created by this program. This appears under 'Type' on the dialog for creating new cards in Anki.") } -- cgit v1.2.3