Skip to content

Commit

Permalink
snippet added [if error block then return error]
Browse files Browse the repository at this point in the history
  • Loading branch information
shahriar-pathao committed Sep 20, 2022
1 parent 3063e68 commit 0cc44a4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions snippets/go.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@
"body": "if err != nil {\n\t${1:return ${2:nil, }${3:err}}\n}",
"description": "Snippet for if err != nil"
},
"if err block": {
"prefix": "iferb",
"body": "if err := $1; err != nil {\n\t${2:return $3 err}\n}\n",
"description": "Snippet for if err block"
},
"fmt.Println": {
"prefix": "fp",
"body": "fmt.Println(\"$1\")",
Expand Down

0 comments on commit 0cc44a4

Please sign in to comment.