Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Use vscode-go without GOPATH #2458

Closed
dancojocaru2000 opened this issue Apr 23, 2019 · 3 comments
Closed

Use vscode-go without GOPATH #2458

dancojocaru2000 opened this issue Apr 23, 2019 · 3 comments

Comments

@dancojocaru2000
Copy link

Leaving the religious, almost cult-like defense of GOPATH aside, Go 1.11 allows people to use Go without a GOPATH using modules.

Yet when trying to use Go in VSCode, the following notification appears:

Some Go analysis tools are missing from your GOPATH. Would you like to install them?

How should someone who isn't using GOPATH at all set up their environment in order to use VSCode for coding in Go?

Can the solution also be included here?

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Apr 23, 2019

That notification is about the extension's inability to find the tools.

Are you suggesting that we remove the reference to GOPATH in that notification or not look at GOPATH for finding the tools?

Even when GOPATH is not used by your projects, the default GOPATH would be ~/go which is where the tools will get installed to unless you set the go.toolsGopath setting

@dancojocaru2000
Copy link
Author

Ah, sorry, my bad. I thought that no GOPATH is set by default.

So, if not using GOPATH in projects, one shouldn't worry about it, right?

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Apr 24, 2019

So, if not using GOPATH in projects, one shouldn't worry about it, right?

Yes. I also agree that, that notification might be confusing to new users to Go, who might never had to think about GOPATH.

Updated the messaging there to avoid reference to GOPATH with 21bab08

Thanks for reporting!

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants