I have then follwing repo structure:
.git
mysrc/
|- go.mod
|- a/some.go
...
in my repo. When I am inside the repo and execute go test mysrc/a
, it does not work.
as go
tells me it cannot find the go.mod
file.
go: cannot find main module, but found .git/config in /home/nixos/Desktop/Repos/myrepo
to create a module there, run:
go mod init
But the normal cd mysrc && go test a
works fine.
How can I execute go test
inside the root folder.
PS: I need this to make the debug adapter nvim-dap
configurations work, which starts dlv
inside the root repo which build with go build -o __debug_bin2596382558 -gcflags all=-N -l ./mysrc/a
The solution is to use the following
dap
configuration forgo
innvim
withmfussenegger/nvim-dap