Stop Fighting Your Go Tests: Simplify and Clarify
This time, we’re rolling up our sleeves to simplify the test setup, pick Go types that actually make sense, and stop confusing readers with constantly changing names. Continue readingHandling Go Errors In Tests
Errors in Go are like the STOP sign. They send a strong signal to avoid disasters. Just like the Go error yelling don’t trust returned value, don’t use it.
Continue readingCritical First Step in Go Tests
“I have two news for you, bad and worse,” said the mechanic. “The battery is dead and I won’t get a new one until Monday. Forget about your annual inspection today,” he continued. “But…” you started. “There is no but.” he cut short.
No setup, no testing. Just like in your Go program.
Continue readingSimple Trick To Speed Up Your Go Tests
We focus on fundamental parts of thecmp package: checking equality and calculating diffs. With a small change, you increase test efficiency more than 7x. Yes, over 700% faster. Why work harder, not smarter?
Continue reading