This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Auto-completion, Go to definition features when using Go modules, commands to run all benchmarks in file and package, using v2 of delve api by default, and more!
Read our wiki on Go modules in VS Code which tracks the progress of Go modules support.
-
- Use of forks for the tools
godef
andgocode
to provideGo to definition
andAuto-completion
features respectively when using Go modules. The binaries installed from these forks will have the suffix-gomod
and will only be used when you use Go modules.
- Use of forks for the tools
-
Bianca Rosa de Mendonça @biancarosa
- New commands
Go: Benchmark File
,Go: Benchmark Package
and codelens to run all the benchmarks in current file & package respectively. Feature Request 1522 with PR 1898 & PR 1899
- New commands
-
- New setting
go.generateTestsFlags
to provide flags for thegotests
tool when generating tests. PR 1841
- New setting
-
- New setting
go.testTags
to be used for running tests. This way, you can use the existinggo.buildTags
for compiling and a different set of tags for running tests. Feature Request 1842 implemented with PR 1877
- New setting
-
- Fix accessibility issues with the
Analysis Tools Missing
button in the status bar. PR 1922
- Fix accessibility issues with the
-
- Improve snippets for
iferr
andforr
i.e "if err ..." the "for range". Feature Request 1920 implemented with PR 1924
- Improve snippets for
-
- Use random port instead of hard-coded 2345 when running delve. Fixes Bug 1906
- Fix issue where tests using the check package cannot be run using the
Go: Test File
command. Bug 1911 - Disable module support when installing the Go tools. Fixes Bug 1919
- Use version 2 of delve apis by default instead of version 1. Replace existing
useApiV1
setting/configuration withapiVersion
. Feature Request 1876 - Prompt to update
gogetdoc
andgopkgs
if using Go modules. - Disable
go.inferGopath
in workspace settings when using Go modules automatically. - Add support for the below features when using Go modules
Go: Add Import
command that gives you a list of importable packages to add to the import block of current fileGo: Browse Packages
command that lets you browse available packages and their files- Auto-completion of unimported packages when
go.autocompleteUnimportedPackages
setting is enabled.