Skip to content

feat: Add support for custom names and methods that return structs with multiple []*T fields in gen-iterators.go#4128

Merged
gmlewis merged 5 commits intogoogle:masterfrom
Not-Dhananjay-Mishra:iter-custom-names
Apr 2, 2026
Merged

feat: Add support for custom names and methods that return structs with multiple []*T fields in gen-iterators.go#4128
gmlewis merged 5 commits intogoogle:masterfrom
Not-Dhananjay-Mishra:iter-custom-names

Conversation

@Not-Dhananjay-Mishra
Copy link
Copy Markdown
Contributor

With customNames map we can assign custom names specifically for the iterator while keeping the original method name unchanged also with this we can give more understandable names for the iterator.

and some method like GetCommit and CompareCommits contains multiple []*T fields with sliceToBeUsedForIteration map we can specify which field should be used for iteration

Related : #4117

@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Apr 2, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.74%. Comparing base (f293a76) to head (1c55146).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4128      +/-   ##
==========================================
+ Coverage   93.72%   93.74%   +0.01%     
==========================================
  Files         211      211              
  Lines       19621    19681      +60     
==========================================
+ Hits        18389    18449      +60     
  Misses       1034     1034              
  Partials      198      198              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @Not-Dhananjay-Mishra!
Just a few tweaks, please (you'll have to make these locally since the indentation and bracketing will change), then we should be ready for a second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @zyfy29 - @munlicode

@Not-Dhananjay-Mishra
Copy link
Copy Markdown
Contributor Author

@gmlewis Thanks again!
I've made all the changes.

Copy link
Copy Markdown
Contributor

@stevehipwell stevehipwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @Not-Dhananjay-Mishra and @stevehipwell!
LGTM.
Merging.

@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Apr 2, 2026
@gmlewis gmlewis merged commit bcc8a33 into google:master Apr 2, 2026
8 checks passed
@Not-Dhananjay-Mishra Not-Dhananjay-Mishra deleted the iter-custom-names branch April 3, 2026 03:24
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