diff options
| author | Grant Ammons <gammons@gmail.com> | 2017-06-12 08:13:15 -0400 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2017-06-12 08:13:15 -0400 |
| commit | c50de79c4828dbb4f9b5c23bf9e00ea4dea38a01 (patch) | |
| tree | 1c6a3a75ca21299e160778f9dd5fddb3be9f3828 /todolist/memory_store.go | |
| parent | cb849e5a8e0280d9fc10941d915f6252a0ad1cdc (diff) | |
Fix #64, parsing a todo with europe date format
* the `hasDue` function was not running, and therefore it was not parsing the due date.
* Also added the beginnings of a more holistic test approach, using `app_test.go`.
Diffstat (limited to 'todolist/memory_store.go')
| -rw-r--r-- | todolist/memory_store.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/todolist/memory_store.go b/todolist/memory_store.go new file mode 100644 index 0000000..44a703c --- /dev/null +++ b/todolist/memory_store.go @@ -0,0 +1,19 @@ +package todolist + +type MemoryStore struct { + Todos []*Todo +} + +func NewMemoryStore() *MemoryStore { + return &MemoryStore{} +} + +func (m *MemoryStore) Initialize() {} + +func (m *MemoryStore) Load() ([]*Todo, error) { + return m.Todos, nil +} + +func (m *MemoryStore) Save(todos []*Todo) { + m.Todos = todos +} |
