Fixup language on help message to denote phases

Signed-off-by: Timothy St. Clair <timothysc@gmail.com>
pull/58/head
Timothy St. Clair 2018-11-13 16:11:58 -06:00
parent 9bbf8de245
commit ef3380b42d
3 changed files with 6 additions and 5 deletions

View File

@ -35,7 +35,7 @@ import (
var (
bootstrapTokenLongDesc = normalizer.LongDesc(`
Bootstrap tokens are used for establishing bidirectional trust between a node joining
the cluster and a the master node.
the cluster and a the control-plane node.
This command makes all the configurations required to make bootstrap tokens works
and then creates an initial token.
@ -61,8 +61,9 @@ func NewBootstrapTokenPhase() workflow.Phase {
return workflow.Phase{
Name: "bootstrap-token",
Aliases: []string{"bootstraptoken"},
Short: bootstrapTokenLongDesc,
Long: bootstrapTokenExamples,
Short: "Generates bootstrap tokens used to join a node to a cluster",
Example: bootstrapTokenExamples,
Long: bootstrapTokenLongDesc,
CmdFlags: []string{
options.CfgPath,
options.KubeconfigDir,

View File

@ -250,7 +250,7 @@ func (e *Runner) Help(cmdUse string) string {
// prints the list of phases indented by level and formatted using the maxlength
// the list is enclosed in a mardown code block for ensuring better readability in the public web site
line := fmt.Sprintf("The %q command executes the following internal workflow:\n", cmdUse)
line := fmt.Sprintf("The %q command executes the following phases:\n", cmdUse)
line += "```\n"
offset := 2
e.visitAll(func(p *phaseRunner) error {

View File

@ -269,7 +269,7 @@ func TestHelp(t *testing.T) {
},
}
expected := "The \"myCommand\" command executes the following internal workflow:\n" +
expected := "The \"myCommand\" command executes the following phases:\n" +
"```\n" +
"foo long description for foo ...\n" +
" /bar long description for bar ...\n" +