airshipctl/cmd/config/testdata/TestConfigSetContextGoldenOutput/config-cmd-set-context-too-many-args.golden
Ian Howell 9ffc305392 Define a standard for creating commands
This commit cleans up the command constructors in an attempt to make the
codebase more uniform and approachable. This includes several refactors:

* Removed the FlagConstants - this makes the help messages and examples
  significantly more readable without needed to compile and run
  airshipctl
* Long help messages and examples are now constant
* Short, Long, and Examples all begin with a capitol letter
* Flag descriptions begin with a lowercase letter. This matches the flag
  description for the builtin "help" flag, making formatting uniform for
  all flags
* Removed redundant unit tests on non-leaf commands

This change also updates the documentation for the affected commands.

Change-Id: I8b9dcbfd9846b3deaab06dec17f80643dae78de9
2020-04-24 10:50:59 -05:00

29 lines
891 B
Plaintext

Error: accepts at most 1 arg(s), received 2
Usage:
set-context NAME [flags]
Examples:
# Create a new context named "exampleContext"
airshipctl config set-context exampleContext \
--namespace=kube-system \
--manifest=exampleManifest \
--user=exampleUser
--cluster-type=target
# Update the manifest of the current-context
airshipctl config set-context \
--current \
--manifest=exampleManifest
Flags:
--cluster string set the cluster for the specified context
--cluster-type string set the cluster-type for the specified context
--current update the current context
-h, --help help for set-context
--manifest string set the manifest for the specified context
--namespace string set the namespace for the specified context
--user string set the user for the specified context