mirror of https://github.com/mickael-menu/zk
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
414 B
Go
19 lines
414 B
Go
package core
|
|
|
|
type noteContentParserMock struct {
|
|
results map[string]*NoteContent
|
|
}
|
|
|
|
func newNoteContentParserMock(results map[string]*NoteContent) *noteContentParserMock {
|
|
return ¬eContentParserMock{
|
|
results: results,
|
|
}
|
|
}
|
|
|
|
func (p *noteContentParserMock) ParseNoteContent(content string) (*NoteContent, error) {
|
|
if note, ok := p.results[content]; ok {
|
|
return note, nil
|
|
}
|
|
return &NoteContent{}, nil
|
|
}
|