I'm new to VS code and Golang.
I have an existing project containing 2 different services - let's call one A and the second one B.
Both A and B sits under the same directory.
Whenever I try to run A or B, I get the following error :
# directory/directory/directory/A&B_Directory
./A.go:12:6: main redeclared in this block
previous declaration at ./B.go:18:6
I tried playing with the launch.json
file, adding the following sections :
{
"name": "Launch Program",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "FullDirectory/A.go"
}
Also tried in the program attribute to set to ${file}
and many other variations that failed.
I'd love for some direction, I'm kinda lost. Thanks.