-
Notifications
You must be signed in to change notification settings - Fork 487
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
chore(deps): remove minio dependency #5933
Conversation
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! I know it's just copied code, but I couldn't help but put in some comments :) I'm happy to just merge it though.
// supports '*' and '?' wildcards in the pattern string. | ||
// unlike path.Match(), considers a path as a flat name space while matching the pattern. | ||
// The difference is illustrated in the example here https://play.golang.org/p/Ega9qgD4Qz . | ||
func Match(pattern, name string) (matched bool) { |
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.
The comment above talks about a "text", whereas the function's input variable is "name". It'd be nice if both the comment and the function are using the same name.
str = str[1:] | ||
pattern = pattern[1:] |
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.
This seems a bit inefficient? I suppose performance is not important in this case?
actualResult := wildcard.Match(testCase.pattern, testCase.text) | ||
if testCase.matched != actualResult { | ||
t.Errorf("Test %d: Expected the result to be `%v`, but instead found it to be `%v`", i+1, testCase.matched, actualResult) | ||
} |
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.
actualResult := wildcard.Match(testCase.pattern, testCase.text) | |
if testCase.matched != actualResult { | |
t.Errorf("Test %d: Expected the result to be `%v`, but instead found it to be `%v`", i+1, testCase.matched, actualResult) | |
} | |
t.Run(fmt.Sprintf("%d", i+1), func(t *testing.T) { | |
actualResult := wildcard.Match(testCase.pattern, testCase.text) | |
require.Equal(t, actualResult, testCase.matched) | |
}) |
It's a personal preference, but I'd prefer something like this.
* remove minio dependency * gofmt
PR Description
Turns out vendored minio dep used for faro receiver has AGPL license. This PR removes the dependency, instead copying in relevant code from older Apache licenesed version of minio.
Which issue(s) this PR fixes
Notes to the Reviewer
PR Checklist