Repository navigation
How to change the output dir for the compiled binary? #3684
Answered
by
aarzilli
apollo7321
asked this question in
Q&A
|
I have a git repo with a src folder which contains my Go module (go.mod, main.go, ...). Inside the root folder there is another folder "run" which contains a "workdir" folder which contains config files to run the application in dev mode. It looks like this: I want to debug the program/module in src but the binary should be run inside run/workdir, because it uses the binary path to find the configs. In VS Code I can do that with the following launch.json: It was working a few days ago, but I cannot remember what cli arguments I used. I thought it was like this: But the paths the program uses are not correct. |
Answered by
aarzilli
Mar 11, 2024
Replies: 1 comment 5 replies
|
That's the correct option, what does it mean that "the paths the program uses are not correct"? |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes,
--wddoesn't change where the executable is generated (that's the--outputflag), it changes where it is executed.