Hacker News new | ask | show | jobs
by devjam 932 days ago
A huge time-saver for me when adding table-driven test boilerplate in Go has been using gotests[0] to generate the template.

If you use VSCode with the Go extension it's already available there as a command "Go: Generate Unit Tests for Function/Package".

[0] https://github.com/cweill/gotests

1 comments

I just ask ChatGPT to do it. Actually just today I asked it to format an existing set of tests into table-driven format. Worked great.