cmd/output: do not display cue code when value is a struct

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-06-07 13:27:40 +02:00
parent 872822baa6
commit a7f4cd069f

View File

@ -112,6 +112,10 @@ func FormatValue(val *compiler.Value) string {
if val.IsConcreteR() != nil {
return val.IncompleteKindString()
}
if val.IncompleteKindString() == "struct" {
return "struct"
}
// value representation in Cue
valStr := fmt.Sprintf("%v", val.Cue())
// escape \n