error: no go files found in root search path
#636
LandonTClipp
started this conversation in
General
Replies: 3 comments 4 replies
|
I have a repo where my main module I want to mock for is a few folders deep. I am getting this error when I place mockery.yaml at the root, even if I have go files at the root. Is there a way I can keep this at the root, rather than in the sub-folder? |
1 reply
|
I have the same issue. My solution to this is to create a new main func on my project root. Project structure: .mockery.yml all: true
testonly: false
inpackage: true
with-expecter: true
dir: mocks/{{ replaceAll .InterfaceDirRelative "internal" "internal_" }}
packages:
my-package:
config:
recursive: truetest_spec.go package main
import "my-package/pkg/config"
// this is required to generate mock files
// this file is not used anywhere
func main() {
config.Load("")
} |
1 reply
|
Wouldn't it be possible to overcome the go pkg limitation by doing a recursive search, finding all sub directories that contains go files, and then run the command entrypoint for each individual hit? |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This is a discussion thread for this error.
Documentation found here
All reactions