You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
Just helped a friend who is newer to Go through getting a mock made.
She wanted it for tests in her current package and so used the "reflection" version of the mockgen command to make them. However, that caused a circular dependency error in her own build because her own package was being imported.
Using the -source variation, however, "fixed" the problem.
The -self_package flag fixes this for real, but we couldn't figure that out from the docs immediately.
The "fix" of using -source came to us first, but that was maybe an accident? If it was an accident, then this ticket is for figuring out if the reflection version can figure out that the destination file will be in the same package.
If it wasn't, then maybe I need to come up with a documentation PR.