summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorDavid Schlachter <t480-debian-git@schlachter.ca>2026-01-08 13:17:21 -0500
committerDavid Schlachter <t480-debian-git@schlachter.ca>2026-01-08 13:17:21 -0500
commitd30e386491024e3740ac27039cd6b0dd5bb15334 (patch)
treef978bee68ab33f3f0f11d97a7bf3f22c91a74d44 /main.go
parent1cd785a492d968f870e605d079ca5c9310cfcea0 (diff)
Fix argument validation
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files 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.")
}