Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set up goroot in wsl2 goland

Tags:

wsl-2

goland

I'm trying to set up goroot in wls2 Goland,but ut something went wrong: "The selected directory is not a valid home for Go SDK"

enter image description here

What should I do

like image 895
wujieji Avatar asked Jul 10 '20 15:07

wujieji


People also ask

How do I run code in GoLand?

Using the context menu Right-click the opened file or a method in the editor and select Run <method_name> in <file_name> Ctrl+Shift+F10 .

Where is go SDK located windows?

Download and install a WSL distribution (for instance, Ubuntu) from Microsoft Store. Run Ubuntu and install Go (configure GOROOT and GOPATH). In the File Explorer, check that WSL directory is mounted and Go SDK is available under the following path: \\wsl$\Ubuntu\usr\local\go .


1 Answers

At the moment, as of 2020.1.3, you cannot. See the issue that tracks this request and vote/watch it for updates.

like image 114
dlsniper Avatar answered Sep 21 '22 15:09

dlsniper