MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / Leaves

Method Leaves

db/revtree.go:322–328  ·  view source on GitHub ↗

Leaves returns a map of revisions that are leaves in the tree.

()

Source from the content-addressed store, hash-verified

320
321// Leaves returns a map of revisions that are leaves in the tree.
322func (tree RevTree) Leaves() map[string]*RevInfo {
323 m := make(map[string]*RevInfo)
324 tree.forEachLeaf(func(info *RevInfo) {
325 m[info.ID] = info
326 })
327 return m
328}
329
330func (tree RevTree) forEachLeaf(callback func(*RevInfo)) {
331 isParent := map[string]bool{}

Callers 1

UnmarshalJSONMethod · 0.95

Calls 1

forEachLeafMethod · 0.95

Tested by

no test coverage detected