Jason Rich Darmawan
Jason Rich Darmawan

Reputation: 2081

Is there an alternative to get the Golang code completion in VS Code without installing Go?

My goal is to use Go exclusively on Docker. In other words, I try my best not to install Go directly to my computer. And, I am writing the code on a VS Code and use the "Go" extension.

The problem is that when I create a main.go it throws an error:

Failed to find the "go" binary in either GOROOT() or PATH(/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin). Check PATH, or Install Go and reload the window. If PATH isn't what you expected, see https://github.com/golang/vscode-go/issues/971

Is there an alternative to get the code completion feature in VS Code?

Upvotes: 0

Views: 475

Answers (1)

Roy Varghese
Roy Varghese

Reputation: 11

This should be achievable using the Remote Development Extension pack. VSCode has good documentation on using containers as your development enviroment. This will allow you to enjoy all of the Go extension's features without needing Go to be installed directly on your machine. You can opt to install the extensions in the container as well.

See Developing inside a Container

Upvotes: 1

Related Questions