Created
July 27, 2020 21:44
-
-
Save efontan/f62d801506e8526f2f6ebe679c31245a to your computer and use it in GitHub Desktop.
My VSCode Go snippets
This file contains 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
{ | |
"Service with constructor": { | |
"prefix": "service", | |
"body": [ | |
"type $1 struct {", | |
"}\n", | |
"func New${1/(.*)/${1:/capitalize}/}() (*$1, error) {", | |
"\treturn &$1{}, nil", | |
"}", | |
], | |
"description": "Create a new service with constructor" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment