Go for Visual Studio Code v0.6.53 Release Notes
Release Date: 2017-01-30 // about 7 years ago-
Installation improvements
- Sam Herrmann (@samherrmann), Ramya Rao (@ramya-rao-a)
- A new setting
go.toolsGopath
for providing an alternate location to install all the Go tools that the extension depends on, if you don't want them cluttering your GOPATH. PR 351 and PR 737.- This is useful when you work on different GOPATHs.
- Remember to run
Go: Install Tools
command to install the tools to the new location.
- A new setting
- Ramya Rao (@ramya-rao-a)
- All the "Install tool" options (the pop ups you see) and the
Go: Install Tools
command now supportgometalinter
if it is your chosen linting tool. PR 735.- Since
gometalinter
internally installs linters and expects them to be in the user's GOPATH,gometalinter
will get installed to your GOPATH and not the alternate location specified ingo.toolsGopath
- Since
- All the "Install tool" options (the pop ups you see) and the
🏗 Build improvements
- Matt Aimonetti (@mattetti)
- While building, we now use the
-i
flag (for non main packages) which installs dependent packages, which in turn get used in subsequent builds resulting in faster builds in bigger workspaces. PR 718
- While building, we now use the
- Ramya Rao (@ramya-rao-a)
- Build errors with no line numbers (for eg. Import cycle) are now displayed in the output window and will be mapped to the first line of the file. PR 740
✅ Test improvements
-
- A new setting
go.testFlags
that can be used to run tests. If null,go.buildFlags
will be used. PR 482 Customize flags for each of the test command by using different keybindings. PR 482. In the below example,
ctrl+shift+t
is bound to run the tests in current file with-short
flag. The commands here can bego.test.package
,go.test.file
orgo.test.cursor
.{ "key": "ctrl+shift+t", "command": "go.test.file", "args": { "flags": ["-short"] }, "when": "editorTextFocus" }
New toggle command
Go: Toggle Test File
that lets you toggle between your Go file and the corresponding test file. Previous commandsGo: Open Test File
andGo: Open Implementation For Test File
have been deprecated in favor of this new command. PR 739. You can add a keyboard binding to this as below:{ "key": "ctrl+shift+t", "command": "go.toggle.test.file", "when": "editorTextFocus && editorLangId == 'go'" }
If current file is not a test file, show error message while running test commands, instead of displaying success message. Fixes #303
- A new setting
-
- Show error message in output window when running test coverage fails. PR 721
Debugging improvements
- Andreas Kuhn (@ankon)
- Honor the
cwd
launch configuration argument. PR 714
- Honor the
- Ramya Rao (@ramya-rao-a)
- GOPATH set in the
env
property inlaunch.json
will also be used to finddlv
tool. PR 725.
- GOPATH set in the
- Rob Lourens (@roblourens)
- New property
trace
inlaunch.json
to provide option to have verbose logging while debugging using vscode-debug-logger. PR 753. This will help in diagnosing issues with debugging in the Go extension.
- New property
- Sam Herrmann (@samherrmann), Ramya Rao (@ramya-rao-a)