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
The error is actually that the template calls .Generate, which is the Fake's Generate method, not the Generate template function.
After fixing these, package mode still doesn't work correctly. The default value of OutputPath is "shim", which is supposed to be a directory, and according to the usage documentation, counterfeiter is supposed to generate two files into that directory: ".go" for the interface and "shim.go" for the shim. Instead it creates a file at OutputPath, and puts both in there.
Side note: the documentation says <output-path> can be a directory or a file. For interface or function mode, it has to be a file. For package mode, it also currently has to be a file, but I don't know if that is intended or not. I also haven't tried older versions of counterfeiter in package mode, but if I remember correctly, the output path always had to be a file for interface or function mode.
The text was updated successfully, but these errors were encountered:
@nkovacs thanks for your patience on this, I was able to use your suggested fixes, and correct the logic used for the output path. This will be released in v6.4.1.
.Generate
, which is the Fake's Generate method, not the Generate template function.Side note: the documentation says
<output-path>
can be a directory or a file. For interface or function mode, it has to be a file. For package mode, it also currently has to be a file, but I don't know if that is intended or not. I also haven't tried older versions of counterfeiter in package mode, but if I remember correctly, the output path always had to be a file for interface or function mode.The text was updated successfully, but these errors were encountered: