From c50de79c4828dbb4f9b5c23bf9e00ea4dea38a01 Mon Sep 17 00:00:00 2001 From: Grant Ammons Date: Mon, 12 Jun 2017 08:13:15 -0400 Subject: 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`. --- todolist/memory_store.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 todolist/memory_store.go (limited to 'todolist/memory_store.go') 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 +} -- cgit v1.3