Skip to content

Commit 0cc44a4

Browse files
snippet added [if error block then return error]
1 parent 3063e68 commit 0cc44a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

snippets/go.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@
110110
"body": "if err != nil {\n\t${1:return ${2:nil, }${3:err}}\n}",
111111
"description": "Snippet for if err != nil"
112112
},
113+
"if err block": {
114+
"prefix": "iferb",
115+
"body": "if err := $1; err != nil {\n\t${2:return $3 err}\n}\n",
116+
"description": "Snippet for if err block"
117+
},
113118
"fmt.Println": {
114119
"prefix": "fp",
115120
"body": "fmt.Println(\"$1\")",

0 commit comments

Comments
 (0)