diff --git a/anki.d b/anki.d index d827e22..b341390 100755 Binary files a/anki.d and b/anki.d differ diff --git a/db.go b/db.go new file mode 100644 index 0000000..e9ee970 --- /dev/null +++ b/db.go @@ -0,0 +1,16 @@ +package main + +type ( + db struct { + Knowledge Knowledge + Users map[string]User + Cadence []Duration + } + Knowledge struct { + Questions map[string]Question + Answers map[string]Answer + } + User struct { + History map[string][]History + } +) diff --git a/main.go b/main.go index c3e96ce..ea1b909 100644 --- a/main.go +++ b/main.go @@ -22,15 +22,6 @@ type ( Answer(string) Answer PushAnswer(string, string, string, bool) error } - db struct { - Knowledge Knowledge - Users map[string]User - Cadence []Duration - } - Knowledge struct { - Questions map[string]Question - Answers map[string]Answer - } Question struct { Q string Tags []string @@ -41,9 +32,6 @@ type ( TS int64 Author string } - User struct { - History map[string][]History - } History struct { A string TS int64