Open CoderCoco opened 3 months ago
I have a work around by replacing the package causing the issue in the configuration. However, I don't think that this really fits the use case defined by the replace-type
option.
Sorry, the collision handling logic is long in the tooth and doesn't comprehensively handle cases like this. Unless someone wants to tackle that project, using replace-type
is probably the correct approach.
Description
When generating mocks that references a package named
args
a collision occurs with the generated mockRun
function.This is generated:
There is a collision between
args.MetricDestination
and the local variableargs
Mockery Version
2.43.2
Go Version
1.22
Installation Method
Steps to Reproduce
args
that has a type you wish to import.Expected Behavior
I would expect the mock to be generated correctly.
Actual Behavior
A mock is generated but when running tests I get this message:
render/mock_args_interface.go:99:21: args.MetricDestination is not a type