Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Last active August 19, 2021 20:09
Show Gist options
  • Save percybolmer/2c65ee1bdbda695af9b3d8893c822bff to your computer and use it in GitHub Desktop.
Save percybolmer/2c65ee1bdbda695af9b3d8893c822bff to your computer and use it in GitHub Desktop.
{
"ErrCheck": {
// scope is a comma seperated list of languages to apply ErrCheck snippet to
"scope": "go",
// Prefix is the name of the snippet
"prefix": "ErrCheck",
// Body is the lines of code to insert
"body": [
"if err != nil {",
" return err",
"}",
],
"description": "Check for errors and return them if found"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment