I take a crack at program with 2 go data – the primary and also the called feature. I intend to run it under vs code. All the conversations I have actually located on the net handle complicated usage situations that I can not map to my straightforward circumstance. Exactly how can I prepare vs code to run my program. I must include that I have actually checked out several posts regarding the go ecological community and also I do not recognize any one of them. What does GOPATH do? What does GOROOT do? Should I tinker them?
Which Go variation do you utilize? Do you utilize go.mod
?
If all is established as it should, I right click the main.go
in VS Code and also pick “Open up in incorporated incurable”. After That go construct
and also begin making use of ./ primary
(might vary relying on exactly how you called points)
” go construct” causes “C:<< course>> construct does not exist
Will certainly this treatment allow it to run under the debugger or just run it from the command line
go.mod causes not located. What is the appropriate command, is it “go mod” what are the debates? I’m sorry however I have actually been having a hard time for hrs and also all details is created for individuals that are currently specialists
Which variation of Go do you utilize?
kind go variation
in the incurable
go variation go1.19.2 darwin/amd64
go variation go1.19.4 windows/amd64
Do you see any kind of go.mod data?
Otherwise attempt
go mod init.
go mod neat.
// and after that (best click main.go and also pick this as course in VS Code Terminal).
go construct
./ primary.
What trouble especially are you running in to? Have you attempted this VSCode-specific overview to standing up and also running?
It resembles you have actually Go set up along with VSCode, so you can miss to tip 3 and also attempt it from there.