Go testing
Go's testing package provides the tools for writing and running automated tests. Test functions use the testing.T type to report failures, run subtests, and verify program behavior.
Minimal example
func TestAdd(t *testing.T) {
got := 2 + 3
if got != 5 {
t.Fatalf("got %d, want 5", got)
}
}