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

Function checkBookInList

pkg/cli/cmd/sync/sync.go:532–542  ·  view source on GitHub ↗

checkBookInList checks if the given syncList contains the book with the given uuid

(uuid string, list *syncList)

Source from the content-addressed store, hash-verified

530
531// checkBookInList checks if the given syncList contains the book with the given uuid
532func checkBookInList(uuid string, list *syncList) bool {
533 if _, ok := list.Books[uuid]; ok {
534 return true
535 }
536
537 if _, ok := list.ExpungedBooks[uuid]; ok {
538 return true
539 }
540
541 return false
542}
543
544// cleanLocalNotes deletes from the local database any notes that are in invalid state
545// judging by the full list of resources in the server. Concretely, the only acceptable

Callers 2

cleanLocalBooksFunction · 0.85
TestCheckBookInListFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCheckBookInListFunction · 0.68