Created
October 7, 2025 07:34
-
-
Save dvtkrlbs/effbfbef1ffb419ea2d41fcf5c2d34fa to your computer and use it in GitHub Desktop.
if err != nil snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| // Each snippet must have a name and body, but the prefix and description are optional. | |
| // The prefix is used to trigger the snippet, but when omitted then the name is used. | |
| // Use placeholders like $1, $2 or ${1:defaultValue} to define tab stops. | |
| // The $0 determines the final cursor position. | |
| // Placeholders with the same value are linked. | |
| "err check": { | |
| "prefix": "err", | |
| "body": ["if err != nil {", "$1", "}", "$0"], | |
| "description": "Checks for error" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment