Skip to content
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 functionality to slicesext #2619

Merged
merged 3 commits into from
Nov 22, 2023
Merged

Add functionality to slicesext #2619

merged 3 commits into from
Nov 22, 2023

Conversation

bufdev
Copy link
Member

@bufdev bufdev commented Nov 22, 2023

  • Rename ToMap to ToStructMap.
  • Add ToValuesMap that maps []V to a map[K]V based on a func(V)K. Think moduleFullNameToModuleRef := slicesext.ToValuesMap(moduleRefs, func(moduleRef ModuleRef) string { return moduleRef.ModuleFullName().String })
  • Add Duplicates to return duplicates in a slice. To be used in validation.

@bufdev bufdev merged commit 7f54239 into main Nov 22, 2023
7 checks passed
@bufdev bufdev deleted the slicesext branch November 22, 2023 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants