Golang Snippets installs statistics
By honnamkuan · VS Code Marketplace · Snippets
Go snippets for VS Code
Golang Snippets has 102,894 recorded installs on VS Code Marketplace, a change of +0.2% over the past 7 days, ranking #2325 of 2,502 tracked listings.
Rating: 5.00 / 5 from 3 ratings
About Golang Snippets
VS Code Go Snippets
If you find this extension useful, please consider to buy me a coffee ☕ 😉
This extension contains code snippets for Go language in VS Code.
Installation
In order to install an extension you need to launch the Command Palette (Ctrl + Shift + P or Cmd + Shift + P) and type Extensions.
There you have either the option to show the already installed snippets or install new ones. Search for honnamkuan.golang-snippets and install it.
Supported languages (file extensions)
- Go (.go)
Snippets
Below is a list of all available snippets and the triggers of each one.
General
| Prefix | Content |
|---|---|
vv | initialize variable varName := value |
ier | if error if err != nil { myStatements } |
ifok | if ok if value,ok := myFunc; ok { myStatements } |
fr | for range for _, v := range values { myStatements } |
frr | for range channel for v := range channel { myStatements } |
def | case default default: |
cl | close close(closable) |
fms | fmt Sprintf fmt.Sprintf("%+v", args) |
fme | fmt Errorf fmt.Errorf("%+v", args) |
ctx | ctx context.Context |
Types
| Prefix | Content |
|---|---|
st | struct type <pre>type structName struct {<br/>}</pre> |
sf | struct field fieldName string |
stt | struct tag `json:"jsonFieldName"` |
ne | struct constructor method <pre>func NewFoo() *Foo{<br/> return &Foo {<br/> }<br/>}</pre> |
inte | Interface type <pre>type interfaceName interface {<br/>} |
Collection manipulation
| Prefix | Content |
|---|---|
sr | remove one element from slice slice = append(slice[:index], slice[index+1:]...) |
ap | append element to slice slice = append(slice, element) |
del | delete map element by key delete(map, key) |
Return values
| Prefix | Content |
|---|---|
rn | Return Nil return nil |
rne | Return Nil and err return nil, err |
re | Return err return err |
Logging
| Prefix | Content |
|---|---|
lo | log variable log.Printf("%+v\n", varName) |
le | log error log.Printf("%+v\n", err) |
lef | log error (when using logrus) log.Errorf("%+v\n", err) |
lf | log fatal log.Fatal(err) |
lff | log fatal log.Fatalf("%+v\n", err) |
Error Handling
| Prefix | Content |
|---|---|
es | errors with stack errors.WithStack(err) |
em | error with message errors.WithMessage(err, message) |
emf | error with messagef errors.WithMessagef(err, format, args) |
is | errors Is if errors.Is(err, MyError) { myStatements } |
as | errors As <pre>var e ErrorType<br/>errors<span>.</span>As(err, &e) {<br/> myStatements<br/>}</pre> |
Concurrency
| Prefix | Content |
|---|---|
gofunc | anonymous go function go func() { myStatements } |
defunc | anonymous defer function defer func { myStatements } |
lock | sync.Mutex Lock and defer Unlock <pre>mu.Lock()<br/>defer mu.Unlock()</pre> |
nb | non-blocking channel send <pre>select {<br/>case msg <- msgChan:<br/>default:<br/>}</pre> |
Testify Assert
| Prefix | Content |
|---|---|
anil | assert nil assert.Nil(t, actual) |
annil | assert not nil assert.NotNil(t, actual) |
aeq | assert equal assert.Equal(t, expected, actual) |
anerr | assert no error assert.NoError(t, err) |
Import
| Prefix | Content |
|---|---|
logrus | import logrus log "github.com/sirupsen/logrus" |
Description from the VS Code Marketplace listing.
- autocomplete
- go
- go snippet
- go snippets
- golang
- golang snippet
- golang snippets
- golang-snippet
- golang-snippets
- go-snippet
- go-snippets
- snippet
- snippets
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Ratings over time
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Installs on a linear scale. Placement is projected from installs, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (8)Similar VS Code Marketplace Snippets plugins
All 20 Golang Snippets alternativesData source
Install counts, average rating, and rating counts come from the public Visual Studio Marketplace gallery API. Installs are cumulative and exclude updates.
Listing: https://marketplace.visualstudio.com/items?itemName=honnamkuan.golang-snippets. First seen Oct 16, 2026; last successful collection Oct 23, 2026. See the methodology.