-
Notifications
You must be signed in to change notification settings - Fork 46
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
add ignore flag #80
add ignore flag #80
Conversation
This is to propagate these changes to bov. |
Codecov Report
@@ Coverage Diff @@
## master #80 +/- ##
========================================
+ Coverage 77.6% 78.1% +0.4%
========================================
Files 56 56
Lines 2449 2398 -51
========================================
- Hits 1902 1874 -28
+ Misses 444 425 -19
+ Partials 103 99 -4
Continue to review full report at Codecov.
|
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, very much appreciated!
Please add tests for a quick feedback cycle in the future
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.
Looks good and sensible change.
This file starts to need some cleanup and better comments on the growing flags, but that can be a later PR, just mentioned it now to think about.
@@ -33,14 +34,16 @@ Usage: | |||
xxx init -all=f // no index | |||
xxx init -tags=foo,bar // index only foo and bar | |||
*/ | |||
func parseIndex(args []string) (bool, bool, string, []string, error) { | |||
func parseIndex(args []string) (bool, bool, string, bool, []string, error) { |
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.
As the number of return values go, let's consider returning a struct with named fields, eg.
type flags struct {
indexAll bool
force bool
tags string
ignore bool
args []string
}
or maybe keep args separate, but at least the flags together
// parse flagIndexAll, flagIndexTags and return the result | ||
indexFlags := flag.NewFlagSet("init", flag.ExitOnError) | ||
tags := indexFlags.String(flagIndexTags, "", "comma-separated list of tags to index") | ||
all := indexFlags.Bool(flagIndexAll, true, "") | ||
force := indexFlags.Bool(FlagForce, false, "") | ||
ignore := indexFlags.Bool(FlagIgnore, false, "") |
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.
Maybe add an explanation here?
a quick fix needed to sort pod restarts