Commit 4e6eaf4c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 74e02634
...@@ -934,6 +934,29 @@ func pathEqual(patha, pathb []zodb.Oid) bool { ...@@ -934,6 +934,29 @@ func pathEqual(patha, pathb []zodb.Oid) bool {
return true return true
} }
/*
// vtree returns human-readable representation of Tree data.
func vtree(v []TreeEntry) string {
s := ""
for _, e := range v {
if s != "" {
s += " "
}
s += fmt.Sprintf("%v %s", e.Key(), vnode(e.Child()))
}
return s
}
*/
// vnode returns brief human-readable representation of node.
func vnode(node Node) string {
kind := "?"
switch node.(type) {
case *Tree: kind = "T"
case *Bucket: kind = "B"
}
return kind + node.POid().String()
}
const debug = false const debug = false
func tracef(format string, argv ...interface{}) { func tracef(format string, argv ...interface{}) {
......
...@@ -581,28 +581,3 @@ func δassertSlice(δ interface { Head() zodb.Tid; Tail() zodb.Tid }, lo, hi zod ...@@ -581,28 +581,3 @@ func δassertSlice(δ interface { Head() zodb.Tid; Tail() zodb.Tid }, lo, hi zod
panicf("invalid slice: (%s, %s]; (tail, head] = (%s, %s]", lo, hi, tail, head) panicf("invalid slice: (%s, %s]; (tail, head] = (%s, %s]", lo, hi, tail, head)
} }
} }
/*
// vtree returns human-readable representation of Tree data.
func vtree(v []TreeEntry) string {
s := ""
for _, e := range v {
if s != "" {
s += " "
}
s += fmt.Sprintf("%v %s", e.Key(), vnode(e.Child()))
}
return s
}
*/
// vnode returns brief human-readable representation of node.
func vnode(node Node) string {
kind := "?"
switch node.(type) {
case *Tree: kind = "T"
case *Bucket: kind = "B"
}
return kind + node.POid().String()
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment