mirror of https://github.com/k3s-io/k3s
Merge pull request #71009 from timothysc/phaseflow
Fixup language on help message to denote phasespull/58/head
commit
ba7d3c3ba8
|
@ -35,7 +35,7 @@ import (
|
||||||
var (
|
var (
|
||||||
bootstrapTokenLongDesc = normalizer.LongDesc(`
|
bootstrapTokenLongDesc = normalizer.LongDesc(`
|
||||||
Bootstrap tokens are used for establishing bidirectional trust between a node joining
|
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
|
This command makes all the configurations required to make bootstrap tokens works
|
||||||
and then creates an initial token.
|
and then creates an initial token.
|
||||||
|
@ -61,8 +61,9 @@ func NewBootstrapTokenPhase() workflow.Phase {
|
||||||
return workflow.Phase{
|
return workflow.Phase{
|
||||||
Name: "bootstrap-token",
|
Name: "bootstrap-token",
|
||||||
Aliases: []string{"bootstraptoken"},
|
Aliases: []string{"bootstraptoken"},
|
||||||
Short: bootstrapTokenLongDesc,
|
Short: "Generates bootstrap tokens used to join a node to a cluster",
|
||||||
Long: bootstrapTokenExamples,
|
Example: bootstrapTokenExamples,
|
||||||
|
Long: bootstrapTokenLongDesc,
|
||||||
CmdFlags: []string{
|
CmdFlags: []string{
|
||||||
options.CfgPath,
|
options.CfgPath,
|
||||||
options.KubeconfigDir,
|
options.KubeconfigDir,
|
||||||
|
|
|
@ -250,7 +250,7 @@ func (e *Runner) Help(cmdUse string) string {
|
||||||
|
|
||||||
// prints the list of phases indented by level and formatted using the maxlength
|
// 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
|
// 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"
|
line += "```\n"
|
||||||
offset := 2
|
offset := 2
|
||||||
e.visitAll(func(p *phaseRunner) error {
|
e.visitAll(func(p *phaseRunner) error {
|
||||||
|
|
|
@ -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" +
|
"```\n" +
|
||||||
"foo long description for foo ...\n" +
|
"foo long description for foo ...\n" +
|
||||||
" /bar long description for bar ...\n" +
|
" /bar long description for bar ...\n" +
|
||||||
|
|
Loading…
Reference in New Issue