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

difference between source and reflection based output #36

@jmhodges

Description

@jmhodges

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions