To identify failing test cases in a table of tests where you don't have individual names you can use its index:
for i, testCase := range testCases {
t.Run(strconv.Itoa(i), func(t *testing.T) {
// ...
For debugging an individual test case, just skip over all but the failing test case:
for i, testCase := range testCases {
if i != 5 { // 5 is the index of the failing test, remove if statement before committing
continue
}
t.Run(strconv.Itoa(i), func(t *testing.T) {
// ...
It's a quick cheap hack, but occasionally useful.