HN2new | past | comments | ask | show | jobs | submitlogin

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



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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: