-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#23671 Added synopsis for operator root and operator gossip command. #23855
base: main
Are you sure you want to change the base?
Changes from 2 commits
e1cbb96
8681eb2
eb31ad1
b07f8b6
158531f
26d94b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,30 @@ | ||||||
package command | ||||||
|
||||||
import ( | ||||||
"strings" | ||||||
|
||||||
"github.com/mitchellh/cli" | ||||||
) | ||||||
|
||||||
type OperatorGossipCommand struct { | ||||||
Meta | ||||||
} | ||||||
|
||||||
func (*OperatorGossipCommand) Help() string { | ||||||
helpText := ` | ||||||
Usage: nomad operator gossip [options] | ||||||
|
||||||
This command is accessed by using one of the subcommands below. | ||||||
` | ||||||
return strings.TrimSpace(helpText) | ||||||
} | ||||||
|
||||||
func (*OperatorGossipCommand) Synopsis() string { | ||||||
return "Provides access to the Gossip protocol" | ||||||
} | ||||||
|
||||||
func (f *OperatorGossipCommand) Name() string { return "operator gossip" } | ||||||
|
||||||
func (f *OperatorGossipCommand) Run(args []string) int { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The args function parameter is unused, so we can use an underscore to show this is ignored.
Suggested change
|
||||||
return cli.RunResultHelp | ||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,31 @@ | ||||||||||||||||||
package command | ||||||||||||||||||
|
||||||||||||||||||
import ( | ||||||||||||||||||
"strings" | ||||||||||||||||||
|
||||||||||||||||||
"github.com/mitchellh/cli" | ||||||||||||||||||
) | ||||||||||||||||||
|
||||||||||||||||||
type OperatorRootCommand struct { | ||||||||||||||||||
Meta | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
func (*OperatorRootCommand) Help() string { | ||||||||||||||||||
helpText := ` | ||||||||||||||||||
Usage: nomad operator root [options] | ||||||||||||||||||
|
||||||||||||||||||
This command is accessed by using one of the subcommands below. | ||||||||||||||||||
` | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When running the command locally, the output format seemed slightly off. The whitespace suggestion fixes that and the change to the usage keeps more consistency with other commands and correctly shows subcommand expectation.
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
return strings.TrimSpace(helpText) | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
func (*OperatorRootCommand) Synopsis() string { | ||||||||||||||||||
return "Provides access to root encryption keys" | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
func (f *OperatorRootCommand) Name() string { return "operator gossip" } | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this may have been a copy/paste error :D
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
func (f *OperatorRootCommand) Run(args []string) int { | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The args function parameter is unused, so we can use an underscore to show this is ignored.
Suggested change
|
||||||||||||||||||
return cli.RunResultHelp | ||||||||||||||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running the command locally, the output format seemed slightly off. The whitespace suggestion fixes that and the change to the usage keeps more consistency with other commands and correctly shows subcommand expectation.