cmd/cue: rewrite help vet
I was showing CUE to a new user recently and was trying to explain
that `cue vet` is a nice starting point, especially given how
one can use one-liners against schemas in the central registry.
However, the existing help text is verbose and long,
and it omits to mention commonly used features like --list
or how one can validate against a schema from a registry.
Do that rewrite. Keep it brief but useful; a new user does not need
to carefuly understand all the steps that `cue vet` goes through,
or all the different modes that the tool internally understands.
The text also had a hidden mistake: validating data files does not
require passing CUE files; one can use CUE packages just the same.
This was reinforced by all examples using CUE files for schemas.
End the rewrite with modern and realistic examples covering
the three use cases that we find most useful:
1) Checking that a set of packages contain no fatal errors
2) Validating local data against a local schema.
3) Validating local data against a schema in a package from a registry.
Overall we shave 17 lines off of `cue help vet`,
which just barely makes it fit on my screen without needing to scroll.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I003a20a89253d88d5442068d7b7f2740932e469f
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1230080
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Paul Jolly <paul@myitcv.io>