I would like to introduce tparagen, a CLI tool for Go developers. With tparagen, you can easily insert the T.Parallel() method from the testing package into your test functions, helping you make the most of Go's built-in parallel testing capabilities.
Key features of tparagen include:
- Automates T.Parallel() insertion in both main and sub-tests, making parallel testing effortless. - Handles loop variable reassignment for Go versions earlier than 1.21. - Skips insertion if t.Setenv() is called in the test function. - Supports nolint comments for parallel tests.
tparagen is designed to save you time and remove the hassle of manually adding parallelization to each test, especially in large codebases.
Give it a try and speed up your test suite. Happy hacking!