Added NoteStore interface, mock and repository with Create method

This commit is contained in:
Micheal Wilkinson
2026-03-17 21:13:11 +00:00
parent c05603d624
commit 2f035ee485
6 changed files with 42 additions and 41 deletions

View File

@@ -5,11 +5,11 @@ import (
)
type mockNoteStore struct {
notes []models.Note
Notes []models.Note
}
func (m *mockNoteStore) SaveNote(note models.Note) (models.Note, error) {
note.ID = len(m.notes) + 1
m.notes = append(m.notes, note)
note.ID = len(m.Notes) + 1
m.Notes = append(m.Notes, note)
return note, nil
}
}