-
Notifications
You must be signed in to change notification settings - Fork 551
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
match.Platforms and match.Digests #841
Conversation
e138239
to
4007082
Compare
Updated to include |
Codecov Report
@@ Coverage Diff @@
## master #841 +/- ##
==========================================
- Coverage 74.72% 74.33% -0.39%
==========================================
Files 106 106
Lines 4427 4458 +31
==========================================
+ Hits 3308 3314 +6
- Misses 629 651 +22
- Partials 490 493 +3
Continue to review full report at Codecov.
|
4007082
to
2799448
Compare
Review, please @jonjohnsonjr ? |
I'm kinda -1 on having both Option 1: func Foo(foo Foo) Matcher
func Foos(foos []Foo) Matcher Option 2: // Clients have to use match.Foos([]Foo{foo})
func Foos(foos []Foo) Matcher Option 3: // Works with match.Foos(foo) and match.Foos(foo, bar)
func Foos(foos ...Foo) Matcher Option 4: // Works with match.Foo(foo) and match.Foo(foo, bar)
func Foo(foos ...Foo) Matcher WDYT? Order of preference for me is probably 4, 3, 1, 2. We already have |
Oh, yeah, I like 4. Variadic is so nice and easy. The question is, should it be named: func Foo(foo Foo...) Matcher or func Foos(foo Foo...) Matcher I think the second, since it can match multiple? |
They're about equivalent to me, so whichever you prefer. |
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2799448
to
3ff3c6f
Compare
OK, updated @jonjohnsonjr ; take a look. I did |
Option to:
match.Platforms([]v1.Platform)
for any one of them.match.Digest(v1.Hash)
match.Digests([]v1.Hash)
for any one of them.Also tests, of course.