forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cmd/*] Switch to pflag for all CLI flag parsing (vitessio#10619)
* Switch to `pflag` for all parsing This transparently swaps the cli parsing library used by `internal/flag` from the standard library `flag` package to `spf13/pflag`. It also introduces hook points for packages throughout the vitess codebase to register their flags for either all commands using `servenv` or a particular subset of commands. This allows these packages to continue to define their flag variables in a package-private way, but without polluting the global flagset. Signed-off-by: Andrew Mason <[email protected]> * Workaround exit code difference between stdlib `flag` and `pflag` tl;dr stdlib `flag` has [this][1] and `pflag` does not [1]: golang/go@dcf0929 Signed-off-by: Andrew Mason <[email protected]> * adjust test data for difference in spacing between pflag/stdflag Signed-off-by: Andrew Mason <[email protected]> * update lingering legacy flag tests Signed-off-by: Andrew Mason <[email protected]> * Update vtgate/tabletgateway.go to use new interface to isolate flags, update test data Signed-off-by: Andrew Mason <[email protected]> * update flags in java test code Signed-off-by: Andrew Mason <[email protected]>
- Loading branch information
1 parent
772645c
commit 9bd5467
Showing
27 changed files
with
889 additions
and
1,515 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.