diff options
| author | Grant Ammons <gammons@gmail.com> | 2017-06-19 12:58:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-19 12:58:27 -0400 |
| commit | dafb74428d8a16b28533aa25f83f25ea255c18a3 (patch) | |
| tree | b5df1531dec03b2a2beb3a1ea05b42938684b937 /todolist/memory_store.go | |
| parent | 4a91b284cc1840ad4dc4e60e831c8c6e3de283de (diff) | |
| parent | 0d815737ccb61a6664a9943516518decdddf0bb2 (diff) | |
Merge pull request #68 from gammons/code-cleanup
Fix parsing a todo with europe date format
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 +} |
