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

wildcard support #21

Closed
nizsheanez opened this issue Jan 6, 2016 · 3 comments
Closed

wildcard support #21

nizsheanez opened this issue Jan 6, 2016 · 3 comments

Comments

@nizsheanez
Copy link

now we have lot's of interfaces and our comand look like:

//go:generate mockgen -package mocks -destination destpath.go package_name Interface1,Interface2,Interface3,Interface4,Interface5,Interface6,Interface7,Interface8,Interface9,Interface10,Interface11,Interface12,Interface12

Can we change it to

//go:generate mockgen -package mocks -destination destpath.go package_name "*"

?

@dsymonds
Copy link
Contributor

dsymonds commented Jan 6, 2016

Go's reflection support does not permit reflecting over a package, so there'd be no way to implement a wildcard like that.

If you have a specific package in mind, perhaps you can automate by grep+sed to extract the names of all the exported interfaces?

@nizsheanez
Copy link
Author

Reflection doesn't, maybe Ast support, will check...

@dsymonds
Copy link
Contributor

I think this is working as intended, and working as possible.

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

No branches or pull requests

2 participants