Table driven tests are a popular model for testing in Go and a clear improvement to traditional testing of one function per case. However, there’s an alternative style that can often be clearer than table driven tests that relies on function closures. I’ll reference the example code on Dave Cheney’s post Prefer table driven tests for my examples. The original way Link to heading The code we want to test is a function that splits strings.