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

Counterfeiter does not find imported foreign interfaces #87

Closed
elgohr opened this issue Jun 2, 2018 · 1 comment
Closed

Counterfeiter does not find imported foreign interfaces #87

elgohr opened this issue Jun 2, 2018 · 1 comment

Comments

@elgohr
Copy link

elgohr commented Jun 2, 2018

Counterfeiter doesn't find foreign interfaces from other packages inside of interfaces.
See elgohr@7e4c853

@elgohr
Copy link
Author

elgohr commented Jun 9, 2018

Short update.

I spend a little time on debugging and trying to detect the source of evil.
Actually the locator adds the wrong alias to the importSpec.

locator.go (line 224 - line 228)

if importSpec.Name == nil {
	alias = path.Base(strings.Trim(importSpec.Path.Value, `"`))
} else {
	alias = importSpec.Name.Name
}

The importSpec.Name is nil, so aliased_package is added as the alias, instead of the_aliased_package.

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

No branches or pull requests

1 participant