Writing Tests in Go (a Beginners Guide)
There a many benefits to testing your code in general, which we won’t go into detail on (but if you’re interested, take a look here) all we will say is the quote below.
“Imperfect tests, run frequently, are much better than perfect tests that are never written at all”. - Fowler
First Test We’ve created the most basic progam, to add two numbers together, below in main.go which we’re going to write a test for.