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

Function printBookLine

pkg/cli/cmd/view/book.go:67–73  ·  view source on GitHub ↗
(w io.Writer, info bookInfo, nameOnly bool)

Source from the content-addressed store, hash-verified

65}
66
67func printBookLine(w io.Writer, info bookInfo, nameOnly bool) {
68 if nameOnly {
69 fmt.Fprintln(w, info.BookLabel)
70 } else {
71 fmt.Fprintf(w, "%s %s\n", info.BookLabel, log.ColorYellow.Sprintf("(%d)", info.NoteCount))
72 }
73}
74
75func listBooks(ctx context.DnoteCtx, w io.Writer, nameOnly bool) error {
76 db := ctx.DB

Callers 1

listBooksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected