-
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?
Conversation
Please give feedback if I did anything wrong. |
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.
Hi @raj-hegde and thank you very much for raising this PR. I have added some minor suggestions for you to look at. Once these are resolved, I will get this PR merged.
Also, if you could add a changelog entry via the make cl
command, that would be awesome.
command/operator_gossip.go
Outdated
Usage: nomad operator gossip [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 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.
Usage: nomad operator gossip [options] | |
This command is accessed by using one of the subcommands below. | |
` | |
Usage: nomad operator gossip <subcommand> [options] [args] | |
This command is accessed by using one of the subcommands below. | |
` |
command/operator_gossip.go
Outdated
|
||
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 comment
The 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.
func (f *OperatorGossipCommand) Run(args []string) int { | |
func (f *OperatorGossipCommand) Run(_ []string) int { |
command/operator_root.go
Outdated
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 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.
Usage: nomad operator root [options] | |
This command is accessed by using one of the subcommands below. | |
` | |
Usage: nomad operator root <subcommand> [options] [args] | |
This command is accessed by using one of the subcommands below. | |
` |
command/operator_root.go
Outdated
|
||
func (f *OperatorRootCommand) Name() string { return "operator gossip" } | ||
|
||
func (f *OperatorRootCommand) Run(args []string) int { |
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.
The args function parameter is unused, so we can use an underscore to show this is ignored.
func (f *OperatorRootCommand) Run(args []string) int { | |
func (f *OperatorRootCommand) Run(_ []string) int { |
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 comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may have been a copy/paste error :D
func (f *OperatorRootCommand) Name() string { return "operator gossip" } | |
func (f *OperatorRootCommand) Name() string { return "operator root" } |
Hi @jrasell, Thanks for the feedback I'll work on it right away. |
Hi @jrasell removed white spaces keeping consistency with other commands and changed the args function operator to underscore. Also made a changlelog entry. Any feedback is greatly appreciated. |
Synopsis comment for both gossip and root section has been added. Added the respective command files for each of the subcommands.
closes #14881
closes #23671