Skip to content

Instantly share code, notes, and snippets.

@JohnIrle
Created March 16, 2024 21:24
Show Gist options
  • Save JohnIrle/a7618a0d38419da99a378f26dbb973c4 to your computer and use it in GitHub Desktop.
Save JohnIrle/a7618a0d38419da99a378f26dbb973c4 to your computer and use it in GitHub Desktop.
Go land live template for t.Run
  • Create a new live template under the Go template group

  • Give it an abbreviation. I use trun

  • Use the Go -> expression context

  • Paste this into the "Template text" box

t.Run("$NAME$", func(t *testing.T) {
    $END$
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment