Skip to content

Instantly share code, notes, and snippets.

@thiagocaiubi
Last active February 23, 2018 12:06
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 thiagocaiubi/afcfb57f45cef2e892146402ac5d368a to your computer and use it in GitHub Desktop.
Save thiagocaiubi/afcfb57f45cef2e892146402ac5d368a to your computer and use it in GitHub Desktop.
A boilerplate for Go table-driven tests running in parallel
package main_test
import "testing"
func TestMain(t *testing.T) {
testCases := []struct {
name string
}{
{
name: "test name",
},
}
for _, testCase := range testCases {
testCase := testCase
t.Run(testCase.name, func(t *testing.T) {
t.Parallel()
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment