Created
February 2, 2021 20:44
-
-
Save grantseltzer/bd69a8652e1ccb6bed3219c9e991f6ab to your computer and use it in GitHub Desktop.
Scaffolding for pretty much every go unit tests
This file contains hidden or 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
package main | |
import "testing" | |
func TestXXX(t *testing.T) { | |
testCases := []struct { | |
testName string | |
}{ | |
{ | |
testName: "foo", | |
}, | |
{}, | |
} | |
for _, testcase := range testCases { | |
t.Run(testcase.testName, func(t *testing.T) { | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment