2024-01-14 23:20:45 +08:00
|
|
|
{
|
2024-01-22 20:23:18 +08:00
|
|
|
"class": {
|
|
|
|
"prefix": "class",
|
|
|
|
"body": "type $1 struct{$2}\n$0"
|
2024-01-26 15:32:49 +08:00
|
|
|
},
|
2024-01-27 12:31:15 +08:00
|
|
|
"errnil": {
|
|
|
|
"prefix": "errnil",
|
2024-01-26 15:32:49 +08:00
|
|
|
"body": [
|
|
|
|
"if err != nil {",
|
2024-01-27 12:31:15 +08:00
|
|
|
" $1",
|
2024-01-26 15:32:49 +08:00
|
|
|
"}"
|
|
|
|
]
|
2024-01-28 16:12:42 +08:00
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"prefix": "init",
|
|
|
|
"body": [
|
|
|
|
"func init() {",
|
|
|
|
" $1",
|
|
|
|
"}"
|
|
|
|
]
|
2024-02-07 13:34:06 +08:00
|
|
|
},
|
|
|
|
"ctx": {
|
|
|
|
"prefix": "ctx",
|
|
|
|
"body": [
|
|
|
|
"ctx := context.Background()"
|
|
|
|
]
|
2024-01-22 20:23:18 +08:00
|
|
|
}
|
2024-01-14 23:20:45 +08:00
|
|
|
}
|