cue
cue copied to clipboard
cue/fmt: various formatting issues
There is an extra tab indentation in the following after cue fmt
machine_type: [
if arch == "amd" {"n2-standard-2"},
if arch == "arm" {"t2a-standard-2"},
"unknown arch",
][0]
cue fmt actually turns the expected output into the unexpected (with an extra tab)
exec cue fmt file.cue
cmp file.cue golden.cue
-- file.cue --
arch: string
machine_type: [
if arch == "amd" {"n2-standard-2"},
if arch == "arm" {"t2a-standard-2"},
"unknown arch",
][0]
-- golden.cue --
arch: string
machine_type: [
if arch == "amd" {"n2-standard-2"},
if arch == "arm" {"t2a-standard-2"},
"unknown arch",
][0]
If you remove the [0] from the end, it no longer has the extra tab indentation