Skip to content

Commit

Permalink
🐛 fix printing of nested structures (#1988)
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Richter <[email protected]>
  • Loading branch information
arlimus authored Sep 29, 2023
1 parent fa0d447 commit 6eb4eb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cli/printer/mql.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ func (print *Printer) autoExpand(blockRef uint64, data interface{}, bundle *llx.
return "[]"
}

prefix := " "
prefix := indent + " "
res.WriteString("[\n")
for i := range arr {
c := print.autoExpand(blockRef, arr[i], bundle, prefix)
Expand Down Expand Up @@ -491,7 +491,7 @@ func (print *Printer) autoExpand(blockRef uint64, data interface{}, bundle *llx.
}

label := bundle.Labels.Labels[checksum]
val := print.Data(vv.Type, vv.Value, checksum, bundle, "")
val := print.Data(vv.Type, vv.Value, checksum, bundle, indent)
res.WriteByte(' ')
res.WriteString(label)
res.WriteByte('=')
Expand Down
2 changes: 1 addition & 1 deletion cli/printer/printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func TestPrinter_Assessment(t *testing.T) {
"if: {",
" [failed] Expected 4 users but got 1",
" users.where.list: [",
" 0: user name=\"root\" uid=0 gid=0",
" 0: user name=\"root\" uid=0 gid=0",
" ]",
"}",
}, "\n"),
Expand Down

0 comments on commit 6eb4eb2

Please sign in to comment.