cmd/cue: alter flag behavior based on the command name
Rather than having each "add flags" take boolean arguments,
have the functions take the whole command and alter behavior
based on what is the command they're adding the flags to.
Either mechanism works OK so far, although boolean values without
context don't really say much about what they're meant for.
However, we want to add more variety in which flags are added
or with what default values for each flag,
so adding more boolean knobs will start scaling poorly.
One minor advantage of this change is that we centralize
the presence and default values of shared flags in flags.go.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: If334743be3bc7897d0d7efe558d57b518fa3b4d4
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1230086
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Matthew Sackman <matthew@cue.works>