],
"description": "a constant block"
},
+ "type function declaration": {
+ "prefix": "tyf",
+ "body": [
+ "type ${1:name} func($3) $4"
+ ],
+ "description": "a type function declaration"
+ },
"type interface declaration": {
"prefix": "tyi",
"body": [
"for statement": {
"prefix": "for",
"body": [
- "for ${1:i} := 0; $1 < ${2:count}; $1${3:++} {",
+ "for ${1:i} := ${2:0}; $1 < ${3:count}; $1${4:++} {",
"\t$0",
"}"
],
"for range statement": {
"prefix": "forr",
"body": [
- "for ${1:_, }${2:var} := range ${3:var} {",
+ "for ${1:_, }${2:v} := range ${3:v} {",
"\t$0",
"}"
],
],
"description": "Test function"
},
+ "test main": {
+ "prefix": "tm",
+ "body": [
+ "func TestMain(m *testing.M) {",
+ "\t$1",
+ "",
+ "\tos.Exit(m.Run())",
+ "}"
+ ],
+ "description": "TestMain function"
+ },
"benchmark function": {
"prefix": "bf",
"body": [