Skip to content

Instantly share code, notes, and snippets.

@hnakamur
Created June 27, 2023 21:03
Show Gist options
  • 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