derision-test / go-mockgen

MIT License
58 stars 8 forks source link

fix type params on mocks when bound is in same package #39

Closed Strum355 closed 2 years ago

Strum355 commented 2 years ago

When the bound of a generic is declared in the same package as the output package of the generated mocks, the output would attempt to import the current package, causing an import loop error in gopls (don't remember the error by go test).

This fixes it by using the existing sanitizing routines but by passing the correct data down.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication