Merge pull request #71009 from timothysc/phaseflow

Fixup language on help message to denote phases
pull/58/head
k8s-ci-robot 2018-11-14 09:26:20 -08:00 committed by GitHub
commit ba7d3c3ba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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" +