Open
Conversation
qdm12
reviewed
Sep 11, 2025
Owner
qdm12
left a comment
There was a problem hiding this comment.
Thanks, a few adjustments to be made + eventual refactor of other code parts
internal/cli/help.go
Outdated
| "fmt" | ||
| ) | ||
|
|
||
| func (c *CLI) Help() { |
Owner
There was a problem hiding this comment.
Actually, in order to later not forget to add a help message... it would be cool if each command be a struct implementing the interface
type Command interface {
Run() error
Name() string // for example "help", "genkey"
Description() string // for example "Update the VPN servers data for some or all providers"
}And then the help command would take a slice of all commands to print the help message? That would require to refactor a bit existing commands, so it's fine if you want to skip this comment as well.
Contributor
Author
There was a problem hiding this comment.
I've made an attempt at a refactor with 2af3d40, let me know what you think.
Owner
There was a problem hiding this comment.
I'll review shortly, just rushing for a v3.41.0 release currently.
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com>
27f74e4 to
fe3d4a9
Compare
d0247a1 to
0eeee5c
Compare
30fe1a1 to
b04529c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The commands are not discoverable:
I was only aware of them because I happened to snoop around the codebase.
Ironically, as we use flags, some of the commands do have help text:
This PR adds new help text when a use provides
-helpor--help, the help text is printed by default: