nvim/snippets/go.json
2024-02-07 13:34:06 +08:00

29 lines
392 B
JSON

{
"class": {
"prefix": "class",
"body": "type $1 struct{$2}\n$0"
},
"errnil": {
"prefix": "errnil",
"body": [
"if err != nil {",
" $1",
"}"
]
},
"init": {
"prefix": "init",
"body": [
"func init() {",
" $1",
"}"
]
},
"ctx": {
"prefix": "ctx",
"body": [
"ctx := context.Background()"
]
}
}