diff --git a/snippets/go.json b/snippets/go.json index 53d09670f9..bf31b8e3cf 100644 --- a/snippets/go.json +++ b/snippets/go.json @@ -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\")",