GetNote gets a note from a notefile
(ctx context.Context, notefileID string, noteID string)
| 1367 | |
| 1368 | // GetNote gets a note from a notefile |
| 1369 | func (box *Notebox) GetNote(ctx context.Context, notefileID string, noteID string) (note note.Note, err error) { |
| 1370 | openfile, file, err := box.OpenNotefile(ctx, notefileID) |
| 1371 | if err != nil { |
| 1372 | return |
| 1373 | } |
| 1374 | |
| 1375 | note, err = file.GetNote(noteID) |
| 1376 | |
| 1377 | openfile.Close(ctx) |
| 1378 | |
| 1379 | return |
| 1380 | } |
| 1381 | |
| 1382 | // Checks a notefile and rejects attempts to add more than 100 notes |
| 1383 | func (box *Notebox) checkAddNoteLimits(ctx context.Context, notefileID string, noteObj note.Note) (err error) { |
no test coverage detected