From 1af96145135e7cfbaddcc903f164dbfb0b8af0c8 Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 2 Jan 2024 12:59:12 -0500 Subject: [PATCH] dict use this Dictionary file. --- create_db.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/create_db.go b/create_db.go index c9e6e46..fc395ed 100644 --- a/create_db.go +++ b/create_db.go @@ -25,6 +25,7 @@ var topEnglishWords = []string{ func main() { dbPtr := flag.String("db", "./english_words.db", "SQLite3 DB file to use") + dictFilePtr := flag.String("dict", "./rnd-english", "Dictionary file to use") flag.Parse() // Randomize high Freq. words @@ -67,9 +68,8 @@ func main() { fmt.Println("Top English words inserted into the database.") - // Read the contents of the american-english file - filePath := "./rnd-english" - content, err := ioutil.ReadFile(filePath) + // Read the contents of the shuf american-english file + content, err := ioutil.ReadFile(*dictFilePtr) if err != nil { log.Fatal(err) }