golang / mock

GoMock is a mocking framework for the Go programming language.
Apache License 2.0
9.29k stars 610 forks source link

Support array parsing with length using binary expression and parenthesis #575

Closed sryoya closed 2 years ago

sryoya commented 3 years ago

Requested feature Mockgen should be able to parse an array using a binary expression or parenthesis in its length. They are not parsed correctly yet. e.g. [1 + 2]int, [(2)]int

Why the feature is needed As they are available expressions in the Go specifications, Mockgen should be able to handle them.

(Optional) Proposed solution A clear description of a proposed method for More work needs to be done on the changes were made in #520 and #569

sryoya commented 3 years ago

@codyoss I already have the change ready in my local. As soon as you give me the go-ahead, I can get you a PR 👋