Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

fix parse arrays with const length correctly #520

Merged
merged 6 commits into from
Feb 24, 2021
Merged

Conversation

fsmiamoto
Copy link
Contributor

Fixes #294

Description
As described in the related issue - #294 - parsing an array with a const defined size would generate a panic.

This PR attempts fix that issue.

Would love to hear some feedback 🙂

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests

Reviewer Notes

  • The code flow looks good.
  • Tests added.

Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

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

Just a couple of small things, thanks for the contribution!

mockgen/internal/tests/const_array_length/input.go Outdated Show resolved Hide resolved
mockgen/internal/tests/const_array_length/input.go Outdated Show resolved Hide resolved
mockgen/parse_test.go Outdated Show resolved Hide resolved
@codyoss codyoss changed the title parse arrays with const length correctly (#294) fix parse arrays with const length correctly Feb 23, 2021
@fsmiamoto
Copy link
Contributor Author

Thanks for the review! I guess we should be good now.

@codyoss codyoss merged commit 6ff1070 into golang:master Feb 24, 2021
@codyoss
Copy link
Member

codyoss commented Feb 24, 2021

Thank you for your contribution! 🎆

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic on generating mock for interface with method returing array with const as size
2 participants