-
Notifications
You must be signed in to change notification settings - Fork 9.1k
refactor: use slices.Contains to simplify code #5292
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
base: main
Are you sure you want to change the base?
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.
Technically, you did the right thing, but in my opinion, it can be improved. Try to do better.
Thanks for your review! Modified! |
please achieve a green pipline |
Thanks. Modified. |
@pfi79 I have fix the mock test file, Please approve the CI and review again when you have time. ![]() |
ad8bdea
to
d2743de
Compare
@keeghcet Look at the tests. It seems that some kind of test was touched. The test dropped twice in one place. |
It seems that the assertion for the error should be nil because the error return value has been removed. --- FAIL: TestSnapshotImporterErrorPropagation (0.09s)
--- FAIL: TestSnapshotImporterErrorPropagation/error-when-membershipProvider-returns-error (0.01s)
snapshot_data_importer_test.go:512:
Error Trace: /home/runner/work/fabric/fabric/core/ledger/pvtdatastorage/snapshot_data_importer_test.go:512
Error: An error is expected but got nil.
Test: TestSnapshotImporterErrorPropagation/error-when-membershipProvider-returns-error Modified. |
Take a look at this test |
Signed-off-by: keeghcet <[email protected]>
Thanks for your help. Removed! |
Type of change
Description
There is a new function added in the go1.21 standard library, which can make the code more concise and easy to read.
Additional details
Related issues