Skip to content

Instantly share code, notes, and snippets.

@hnakamur
Created June 27, 2023 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hnakamur/7ea027fa265608f9c253db09133e3856 to your computer and use it in GitHub Desktop.
Save hnakamur/7ea027fa265608f9c253db09133e3856 to your computer and use it in GitHub Desktop.
main.go snippet for VS Code
{
"package main": {
"prefix": "package main",
"body": [
"package main",
"",
"import \"log\"",
"",
"func main() {",
"\tif err := run(); err != nil {",
"\t\tlog.Fatal(err)",
"\t}",
"}",
"",
"func run() error {",
"\t$1",
"\treturn nil",
"}"
],
"description": "Simple main.go"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment