MCPcopy Index your code
hub / github.com/dnote/dnote / getContent

Function getContent

pkg/cli/cmd/edit/note.go:57–68  ·  view source on GitHub ↗
(ctx context.DnoteCtx, note database.Note)

Source from the content-addressed store, hash-verified

55}
56
57func getContent(ctx context.DnoteCtx, note database.Note) (string, error) {
58 if contentFlag != "" {
59 return contentFlag, nil
60 }
61
62 c, err := waitEditorNoteContent(ctx, note)
63 if err != nil {
64 return "", errors.Wrap(err, "getting content from editor")
65 }
66
67 return c, nil
68}
69
70func changeContent(ctx context.DnoteCtx, tx *database.DB, note database.Note, content string) error {
71 if note.Body == content {

Callers 1

runNoteFunction · 0.70

Calls 1

waitEditorNoteContentFunction · 0.85

Tested by

no test coverage detected