Set up Go with version management and VS Code extension

PHPz
Release: 2024-09-07 06:33:12
Original
583 people have browsed it

Set up Go with version management and VS Code extension

Works with mise and WSL too!


From my answer in the official Go - VS Code Extension repo:

For anyone using mise (formerly rtx) the solution is to point to wherever mise where go or which go says (which should be the mise folder).

However, this will pin it to one specific version due to what seems like a bug (in my case mise install go@latest installed 1.23.0 instead of 1.23.1 as of writing, and saved it to ~/.local/share/mise/installs/go/1.23.0).

To fix this, use the asdf-golang plugin (mise p i https://github.com/asdf-community/asdf-golang) which will install it correctly to ~/.local/share/mise/installs/go/latest/go/bin/go which you can then add to your settings.json:

"go.alternateTools": {
    "go": "~/.local/share/mise/installs/go/latest/go/bin/go"
},
Copy after login

The above is the detailed content of Set up Go with version management and VS Code extension. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template