massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-go / snippets / go.json
index e9cfc58440208135dc8ca974c00fef0689989a25..aa3c58582cc8e0706188e3d220e108a6609bfbe2 100644 (file)
     ],
     "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": [