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

Support specifying interfaces to mock when using source mode #140

Open
dhrubabasu opened this issue Jan 17, 2024 · 3 comments
Open

Support specifying interfaces to mock when using source mode #140

dhrubabasu opened this issue Jan 17, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dhrubabasu
Copy link

dhrubabasu commented Jan 17, 2024

Requested feature A clear description of the desired feature and an example of
how it would be used.

As far as I can tell, there is no way to specify which interfaces to mock out of a file when using source mode

Why the feature is needed A clear description of how this feature is not
served by existing functionality in gomock.

The closest you can get to this functionality is manually passing in every interface other than the one you want to mock in -exclude_interfaces

(Optional) Proposed solution A clear description of a proposed method for
adding this feature to gomock.

Adding an -interfaces flag which auto-computes the -exclude_interfaces flag would be relatively straightforward I think.

@KastenMike
Copy link

KastenMike commented Aug 12, 2024

@kliukovkin created a PR on the initial repo but nobody reviewed it: golang/mock#659
Potentially it could just be added here @r-hang? Cleaner to use than the exclude flag

@JacobOaks JacobOaks added enhancement New feature or request good first issue Good for newcomers labels Aug 27, 2024
@JacobOaks
Copy link
Contributor

Hey, this makes sense to us. We welcome anybody moving the PR here for our review.

@kliukovkin
Copy link

Thanks @KastenMike for raising this! Here is the PR #200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants