-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/cue-ast-print: allow reading stdin
It's useful to be able to pipe stdin into this command. While we're about it, add a proper usage message and make the output slightly more compact by: - omitting a newline for empty slices and structs - omitting the type name when it's implied by an enclosing slice (as allowed in Go slice literals). Also avoid the unneeded calls to `reflect.Value.Interface`: the fmt package will do that automatically for us. Signed-off-by: Roger Peppe <rogpeppe@gmail.com> Change-Id: I6339c4ef8d0af0f7c567301050a837350cb4de7f Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1199601 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
- Loading branch information
Showing
1 changed file
with
52 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters