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"
What should I do
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 .
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 .
At the moment, as of 2020.1.3, you cannot. See the issue that tracks this request and vote/watch it for updates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With