Read: How to set up and tear down unit tests in Go
Article: How to set up and tear down unit tests in Go
I've been writing quite a bit of Go and getting comfortable with Go's testing. Everything feels really good and the test suite has made me so comfortable doing major refactors.
Anyway, I wanted to set up some `beforeEach` action and noticed Go doesn't have it built-in. As any self-respecting developer would do, I requested ChatGPT to cook up something. Instead, what I got was just a bunch of baloney. Thankfully, chef Google swept in and served up this very nice article. It's short and sweet and has a really nice setup. Check this out if you're in the mood for a treat such as this one.