diff --git a/clients/go/cmd/mxgw-go/main.go b/clients/go/cmd/mxgw-go/main.go index 70499bd..543ddef 100644 --- a/clients/go/cmd/mxgw-go/main.go +++ b/clients/go/cmd/mxgw-go/main.go @@ -1568,6 +1568,9 @@ func runGalaxyBrowse(ctx context.Context, args []string, stdout, stderr io.Write // A specific parent → one level of children via the raw parent-scoped RPC. if *parent >= 0 { + if *parent == 0 { + fmt.Fprintln(stderr, "warning: -parent 0 is the server root sentinel; omit -parent for the root walk, or use -parent >= 1") + } if *depth > 0 { fmt.Fprintln(stderr, "warning: -depth is ignored when -parent is specified") } @@ -1696,7 +1699,7 @@ func expandToDepth(ctx context.Context, node *mxgateway.LazyBrowseNode, remainin func printLazyNode(stdout io.Writer, node *mxgateway.LazyBrowseNode, level int) { indent := strings.Repeat(" ", level) obj := node.Object() - fmt.Fprintf(stdout, "%s%d\t%s\t%s\t(attrs=%d, hasChildren=%t)\n", + fmt.Fprintf(stdout, "%s%d\t%s\t%s\t(attrs=%d, hasChildrenHint=%t)\n", indent, obj.GetGobjectId(), obj.GetTagName(), obj.GetBrowseName(), len(obj.GetAttributes()), node.HasChildrenHint()) for _, child := range node.Children() { printLazyNode(stdout, child, level+1) @@ -1707,7 +1710,7 @@ func printLazyNode(stdout io.Writer, node *mxgateway.LazyBrowseNode, level int) // nested JSON object. func lazyNodeToJSON(node *mxgateway.LazyBrowseNode) map[string]any { out := galaxyObjectToJSON(node.Object()) - out["hasChildren"] = node.HasChildrenHint() + out["hasChildrenHint"] = node.HasChildrenHint() children := node.Children() jsonChildren := make([]map[string]any, 0, len(children)) for _, child := range children {