Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Make iferr and forr snippets a bit more convenient. (#1924)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas authored and ramya-rao-a committed Sep 12, 2018
1 parent 9a9e6a3 commit 6678d89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions snippets/go.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
"for range statement": {
"prefix": "forr",
"body": "for ${1:var} := range ${2:var} {\n\t$0\n}",
"body": "for ${1:_, }${2:var} := range ${3:var} {\n\t$0\n}",
"description": "Snippet for a for range loop"
},
"channel declaration": {
Expand Down Expand Up @@ -97,7 +97,7 @@
},
"if err != nil": {
"prefix": "iferr",
"body": "if err != nil {\n\t${1:return}\n}",
"body": "if err != nil {\n\treturn ${1:nil, }err\n}",
"description": "Snippet for if err != nil"
},
"fmt.Println": {
Expand Down Expand Up @@ -246,4 +246,4 @@
"description": "Snippet for sample hello world webapp"
}
}
}
}

0 comments on commit 6678d89

Please sign in to comment.