-
Notifications
You must be signed in to change notification settings - Fork 129
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
Feat/silence print #393
Feat/silence print #393
Conversation
Please review commit by commit.
|
Codecov Report
@@ Coverage Diff @@
## main #393 +/- ##
==========================================
+ Coverage 47.02% 47.03% +0.01%
==========================================
Files 87 88 +1
Lines 6025 6036 +11
==========================================
+ Hits 2833 2839 +6
- Misses 2869 2874 +5
Partials 323 323
Continue to review full report at Codecov.
|
cmd/utils.go
Outdated
set.BoolVar(&silenceEvents, "disable printing events to stdout", | ||
false, "silent events") |
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.
Is the arg order here correct? It looks like you have two usage strings and no name: https://pkg.go.dev/github.com/spf13/pflag#FlagSet.BoolVar
silence-events
seems fine if this is only a partial silence. If it's actually everything, then silence
.
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.
Thanks for catching that, the last refactor gone wrong. Updated.
284ac11
to
06f1bd1
Compare
This patch also lays out code in a way to avoid duplication across commands. decK's commands share significant amount of flags and a code pattern like this can minimize the amount of code and number of code paths that exist with flag parsing.
06f1bd1
to
39571ab
Compare
Fixes #152 #232