// Overwrite a todo if one with the given UUID exists
Overwrite a todo if one with the given UUID exists
// Overwrite a todo if one with the given UUID exists
func (r *InMemoryTodos) Overwrite(uuid uuid.UUID, todo models.Todo) error {
	todo.ID = uuid.String()
	if _, ok := r.todos[uuid]; !ok {
		return errors.New("Todo not found")
	}
	r.todos[uuid] = &todo
	return nil
}
func ( r * InMemoryTodos ) Overwrite ( uuid uuid . UUID , todo models . Todo ) error { todo . ID = uuid . String ( ) if _ , ok := r . todos [ uuid ] ; ! ok { return errors . New ( " " ) } r . todos [ uuid ] = & todo return nil }
Overwrite a todo if one with the given UUID exists
Overwrite a todo if one with the given UUID exists