-
Notifications
You must be signed in to change notification settings - Fork 77
confgenerator: use new generic set #901
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avilevy18
reviewed
Oct 13, 2022
99f4aea to
f175f82
Compare
|
Sync'd offline @martijnvans will take this one as the primary reviewer. |
martijnvans
approved these changes
Oct 24, 2022
martijnvans
approved these changes
Nov 14, 2022
8c8978f to
6fc6a92
Compare
0aa237b to
c846efc
Compare
This PR creates a new `Set[T comparable]` type that we can use to replace some confusing `map` usage. The new `Set` type may end up being useful in other places. This PR also ran `make addlicense` which found a couple unrelated files missing license headers.
Added unit tests for the Set[T] type, as well as a couple missing pieces of functionality to make it a properly usable set type.
* Change exported members to `set.FromSlice` and `set.FromMapKeys` for readability * Add additional check in set_test.TestRemove that ensures the set does not contain key after delete * Remove Makefile target to test the set package Signed-off-by: braydonk <braydonk@google.com>
go-yaml dependency upgrade included a fix I made to error messages that changed a bunch of our golden files. Signed-off-by: braydonk <braydonk@google.com>
This should probably be a separate PR Signed-off-by: braydonk <braydonk@google.com>
c846efc to
0930b22
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR creates a new
Set[T comparable]type that we can use to replace some confusingmapusage. The newSettype may end up being useful in other places.There were a couple other spots nearby that I thought would benefit from using generics instead which I also adjusted.
I also ran
make addlicensewhich found a couple unrelated files missing license headers.Related issue
How has this been tested?
make test_confgenerator, since the unit tests already covered this code.Checklist: