Testing in Go
One of the building blocks of the testing process in any piece of software is known as unit testing. Unit testing is a very popular concept in virtually any programming language, and there are numerous software frameworks and language extensions that allow you to perform unit testing as efficiently as possible.
The idea of unit testing is to test each unit or component of your software separately. A unit can simply be defined as the smallest testable piece of your software.
The Go language comes equipped with a testing package, as well as some Go commands to make the process of unit testing easier. The package can be found at https://golang.org/pkg/testing/.
In this section, we'll dive a bit deeper into how to build unit tests ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access