Skip to content
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

fix version flag for booster-http and booster-bitswap #1590

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

nonsense
Copy link
Member

@nonsense nonsense commented Jul 24, 2023

This PR adds version cmd to booster-http and syncs the version flag for booster-bitswap as it is used on boostd.

@nonsense nonsense requested review from dirkmc and LexLuthr July 24, 2023 12:44
@@ -115,13 +114,3 @@ var initCmd = &cli.Command{
return err
},
}

var versionCmd = &cli.Command{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this, --version flag is supported out of the box with urfave/cli

Flags: []cli.Flag{
cliutil.FlagVerbose,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't use -v for verbose, it is used for --version typically.

@LexLuthr
Copy link
Collaborator

I agree with the flag naming convention. We should stick to traditional naming. We also need to update other binaries and docs as well.

-v, --version = version
-V, --verbose = Verbose

@nonsense
Copy link
Member Author

I agree with the flag naming convention. We should stick to traditional naming. We also need to update other binaries and docs as well.

-v, --version = version -V, --verbose = Verbose

I think -v for --version and --vv for --very-verbose is probably good enough. Then we have 2 levels of logging, and anything else is really custom and probably belongs to set-log-level command.

@nonsense nonsense merged commit b178d6f into main Jul 24, 2023
15 checks passed
@LexLuthr LexLuthr deleted the nonsense/fix-version-flag branch July 24, 2023 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants