package foo
type Foo struct{}
func (f Foo) Foo() {}
If I then run go generate . in the root directory of this project, I get the following output:
$ go generate .
open foo/mockfoo/foo.go: no such file or directory
moq [flags] destination interface [interface2 [interface3 [...]]]
-out string
output file (default stdout)
-pkg string
package name (default will infer)
interface.go:3: running "moq": exit status 1
If I create the target directory for the mock with mkdir foo/mockfoo before I run moq or go generate, then it works as intended.
Bottom line is, moq now does no longer create any target directory for the mock (it does not make sure, that the target directory provided with -out <targetdir>/<targetfile> does exist.
@pdrum Thanks for your work on PR #105. I gave it a quick test and it looks like not all problems of #102 have been fixed.
I have setup the following test project:
interface.go:
foo/realfoo/foo.go:
If I then run
go generate .
in the root directory of this project, I get the following output:If I create the target directory for the mock with
mkdir foo/mockfoo
before I runmoq
orgo generate
, then it works as intended.Bottom line is,
moq
now does no longer create any target directory for the mock (it does not make sure, that the target directory provided with-out <targetdir>/<targetfile>
does exist.