Skip to content

Commit

Permalink
cmd/cue: update the list of output formats
Browse files Browse the repository at this point in the history
This list was missing "cue" at the very least, since the playground
has supported it since day one.

Looking at internal/filetypes/types.go, more are likely missing.
For now, add another easy one, "binary".
Leave a TODO behind as a reminder to look at this again.

While here, right-align the format names to help readability,
especially since we'll at some point need to add longer names too.

Fixes #2186.

Signed-off-by: Daniel Martí <[email protected]>
Change-Id: Icc333c9d0c7c4344907eecd517d7bda712802847
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1168436
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
Reviewed-by: Roger Peppe <[email protected]>
  • Loading branch information
mvdan committed Sep 11, 2023
1 parent a44c805 commit 42ae8e4
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions cmd/cue/cmd/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,25 @@ defined by the files in the current directory.
Formats
The following formats are recognized:
json output as JSON
Outputs any CUE value.
cue output as CUE
Outputs any CUE value.
text output as raw text
The evaluated value must be of type string.
json output as JSON
Outputs any CUE value.
yaml output as YAML
Outputs any CUE value.
`,
yaml output as YAML
Outputs any CUE value.
text output as raw text
The evaluated value must be of type string.
binary output as raw binary
The evaluated value must be of type string or bytes.
`,
// TODO: some formats are missing for sure, like "jsonl" or "textproto" from internal/filetypes/types.cue.
RunE: mkRunE(c, runExport),
}

Expand Down

0 comments on commit 42ae8e4

Please sign in to comment.