Install extension from Visual Studio Marketplace
Install extension from Open-VSX (codeserver/vscodium/gitpod)
Extensions with frequently used snippets and code actions for productive go development.
Extension in active development! Your contribution is always welcome :)
Prefix | Description |
---|---|
pkg |
Package header line |
construct |
Constructor for structure type |
iferr |
if err := fuction(); err != nil { ... } |
Add error checking
- adds stub error checking to current line:
Command "Go: Implement Interface Methods" based on https://github.com/ricardoerikson/vscode-go-impl-methods/ extension by Ricardo Erikson.
Install the impl package as follows:
go get -u github.com/josharian/impl
- At command pallete select command "Go: Implement Interface Methods"
- Write receiver for methods. Example: "f *File", "m MyType", "c CustomType"
- Select interface to implement
Group imports command based on https://github.com/gustavo-bordin/golang-imports-group/ extension by Gustavo Bordin.
- At command pallete select command "Go: Group imports"