-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When using same local flag for different subcommands, binding to the global configuration will erase previous values with the value of the last command's flag registered. See spf13/viper#233. Using a global set of variables to store the flags value of the command solves the issue. Also add a local variable to store the value of the output flag of the tracingpolicy list subcommand. We may want to avoid the usage of the global configuration and using viper.BindPFlags in the future to avoid this issue to appear again. Also add checks on the value of flags that are restricted to certain values. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
- Loading branch information
Showing
2 changed files
with
42 additions
and
34 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