Skip to content

Commit 29dd250

Browse files
committed
internal/diff: use compact printing mode
The default Syntax printing mode is not suitable. We should print evaluated values. Change-Id: I810b531f5898fcca049ac8943c5492e558f89ee5 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6660 Reviewed-by: CUE cueckoo <[email protected]> Reviewed-by: Marcel van Lohuizen <[email protected]>
1 parent bc76c5f commit 29dd250

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/diff/print.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"io"
2020

2121
"cuelang.org/go/cue/errors"
22-
"cuelang.org/go/cue/format"
2322
"cuelang.org/go/internal/legacy/cue"
2423
)
2524

@@ -195,8 +194,8 @@ func (p *printer) printSkipped(n int) {
195194

196195
func (p *printer) printValue(v cue.Value) {
197196
// TODO: have indent option.
198-
b, _ := format.Node(v.Syntax())
199-
p.write(b)
197+
s := fmt.Sprintf("%-v", v)
198+
io.WriteString(p, s)
200199
}
201200

202201
func (p *printer) printFieldRun(es *EditScript, start, end int) {

0 commit comments

Comments
 (0)