From 42d80271d8264d4f3bb96ba4735d45b72f161c20 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sat, 11 Jun 2011 10:12:39 -0700 Subject: [PATCH] show children in describe --- lib/go/camli/search/handler.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/go/camli/search/handler.go b/lib/go/camli/search/handler.go index 1253aeab9..3642131b6 100644 --- a/lib/go/camli/search/handler.go +++ b/lib/go/camli/search/handler.go @@ -316,6 +316,24 @@ claimLoop: dm["size"] = size } } + + // Resolve children + if dmap != nil { + if member, ok := attr["camliMember"].([]string); ok && len(member) > 0 { + wg := new(sync.WaitGroup) + for _, member := range member { + membr := blobref.Parse(member) + if membr != nil { + wg.Add(1) + go func() { + sh.populatePermanodeFields(dmap(membr), membr, signer, dmap) + wg.Done() + }() + } + } + wg.Wait() + } + } } const camliTypePrefix = "application/json; camliType="